Author: andy
Date: Thu Dec  5 16:20:04 2013
New Revision: 1548192

URL: http://svn.apache.org/r1548192
Log:
Sync

Modified:
    
jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/mgt/ActionCtl.java
    
jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/servlets/ActionBase.java
    
jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/servlets/HttpAction.java

Modified: 
jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/mgt/ActionCtl.java
URL: 
http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/mgt/ActionCtl.java?rev=1548192&r1=1548191&r2=1548192&view=diff
==============================================================================
--- 
jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/mgt/ActionCtl.java
 (original)
+++ 
jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/mgt/ActionCtl.java
 Thu Dec  5 16:20:04 2013
@@ -43,6 +43,7 @@ public abstract class ActionCtl extends 
             dsRef = new DatasetRef() ;
             dsRef.name = name ;
         }
+        action.datasetName = name ;
         action.setDataset(dsRef) ;
         executeAction(action) ;
     }

Modified: 
jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/servlets/ActionBase.java
URL: 
http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/servlets/ActionBase.java?rev=1548192&r1=1548191&r2=1548192&view=diff
==============================================================================
--- 
jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/servlets/ActionBase.java
 (original)
+++ 
jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/servlets/ActionBase.java
 Thu Dec  5 16:20:04 2013
@@ -23,7 +23,6 @@ import static java.lang.String.format ;
 import java.io.IOException ;
 import java.util.Enumeration ;
 import java.util.Map ;
-import java.util.concurrent.atomic.AtomicLong ;
 
 import javax.servlet.ServletException ;
 import javax.servlet.http.HttpServletRequest ;
@@ -118,79 +117,8 @@ public abstract class ActionBase extends
         action.minimize() ;
     }
 
+    /** execution point */
     protected abstract void execCommonWorker(HttpAction action) ;
-        
-    @Deprecated
-    protected void inc(AtomicLong x)
-    {
-        x.incrementAndGet() ;
-    }
-
-//    // Execute - no stats.
-//    // Intercept point for the UberServlet 
-//    protected void executeAction(HttpAction action) {
-//        executeLifecycle(action) ;
-//    }
-//    
-//    // This is the service request lifecycle.
-//    // Called directly by the UberServlet which has not done any stats by 
this point.
-//    protected void executeLifecycle(HttpAction action)
-//    {
-//        incCounter(action.dsRef, Requests) ;
-//        incCounter(action.srvRef, Requests) ;
-//
-//        startRequest(action) ;
-//        try {
-//            validate(action) ;
-//        } catch (ActionErrorException ex) {
-//            incCounter(action.dsRef,RequestsBad) ;
-//            incCounter(action.srvRef, RequestsBad) ;
-//            throw ex ;
-//        }
-//
-//        try {
-//            perform(action) ;
-//            // Success
-//            incCounter(action.srvRef, RequestsGood) ;
-//            incCounter(action.dsRef, RequestsGood) ;
-//        } catch (ActionErrorException ex) {
-//            incCounter(action.srvRef, RequestsBad) ;
-//            incCounter(action.dsRef, RequestsBad) ;
-//            throw ex ;
-//        } catch (QueryCancelledException ex) {
-//            incCounter(action.srvRef, RequestsBad) ;
-//            incCounter(action.dsRef, RequestsBad) ;
-//            throw ex ;
-//        } finally {
-//            finishRequest(action) ;
-//        }
-//    }
-//    
-//    /** Map request to uri in the registry.
-//     *  null means no mapping done (passthrough). 
-//     */
-//    protected String mapRequestToDataset(HttpAction action) 
-//    {
-//        return ActionLib.mapRequestToDataset(action.request.getRequestURI()) 
;
-//    }
-//    
-//    protected static void incCounter(Counters counters, CounterName name) {
-//        try {
-//            if ( counters.getCounters().contains(name) )
-//                counters.getCounters().inc(name) ;
-//        } catch (Exception ex) {
-//            Fuseki.serverLog.warn("Exception on counter inc", ex) ;
-//        }
-//    }
-//    
-//    protected static void decCounter(Counters counters, CounterName name) {
-//        try {
-//            if ( counters.getCounters().contains(name) )
-//                counters.getCounters().dec(name) ;
-//        } catch (Exception ex) {
-//            Fuseki.serverLog.warn("Exception on counter dec", ex) ;
-//        }
-//    }
 
     @SuppressWarnings("unused") // ServletException
     protected void doPatch(HttpServletRequest request, HttpServletResponse 
response) throws ServletException, IOException {

Modified: 
jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/servlets/HttpAction.java
URL: 
http://svn.apache.org/viewvc/jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/servlets/HttpAction.java?rev=1548192&r1=1548191&r2=1548192&view=diff
==============================================================================
--- 
jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/servlets/HttpAction.java
 (original)
+++ 
jena/branches/jena-fuseki-new-ui/src/main/java/org/apache/jena/fuseki/servlets/HttpAction.java
 Thu Dec  5 16:20:04 2013
@@ -48,15 +48,27 @@ public class HttpAction
     public final boolean verbose ;
     public final Logger log ;
     
-    // Phase two items - set and valid after the datasetRef is known.  
-    private DatasetGraph dsg ;                  // The data
-    public DatasetRef dsRef ;
-    public ServiceRef srvRef ;
-    
-    private Transactional   transactional ;
-    private boolean         isTransactional;
-    private DatasetGraph    activeDSG ;             // Set when inside 
begin/end.
-    private ReadWrite       activeMode ;            // Set when inside 
begin/end.
+    // ----
+    // Worth subclassing? Given this is allocated in the general lifecycle
+    // it would mean there are downcasts to the specific type.
+    
+    // -- Valid only for operational actions (e.g. SPARQL).
+    private DatasetGraph dsg                = null ;
+    public  ServiceRef srvRef               = null ;
+    private Transactional   transactional   = null ;
+    private boolean         isTransactional = false ;
+    private DatasetGraph    activeDSG       = null ;        // Set when inside 
begin/end.
+    private ReadWrite       activeMode      = null ;        // Set when inside 
begin/end.
+    
+    
+    // -- Valid only for administration actions.
+    public String datasetName               = null ;
+    
+    
+    // -- Shared items (but exact meaning may differ)
+    public  DatasetRef dsRef                = null ;
+
+    // ----
     
     private boolean startTimeIsSet = false ;
     private boolean finishTimeIsSet = false ;
@@ -64,9 +76,6 @@ public class HttpAction
     private long startTime = -2 ;
     private long finishTime = -2 ;
     
-    // Incoming
-    //public final 
-    
     // Outcome.
     int statusCode = -1 ;
     String message = null ;


Reply via email to