qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgodf...@apache.org
Subject svn commit: r1593576 - in /qpid/trunk/qpid/java: broker-core/src/main/java/org/apache/qpid/server/model/ broker-core/src/main/java/org/apache/qpid/server/model/adapter/ broker-core/src/main/java/org/apache/qpid/server/model/port/ broker-core/src/main/j...
Date Fri, 09 May 2014 16:34:53 GMT
Author: rgodfrey
Date: Fri May  9 16:34:53 2014
New Revision: 1593576

URL: http://svn.apache.org/r1593576
Log:
QPID-5574 : [Java Broker] remove redundant state transitions

Modified:
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/FileBasedGroupProviderImpl.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/FileSystemPreferencesProviderImpl.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/AbstractPort.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/AbstractAuthenticationManager.java
    qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java
    qpid/trunk/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/ACLFileAccessControlProviderImpl.java
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagement.java
    qpid/trunk/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/JMXManagementPluginImpl.java

Modified: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java?rev=1593576&r1=1593575&r2=1593576&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java
(original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/AbstractConfiguredObject.java
Fri May  9 16:34:53 2014
@@ -1097,11 +1097,6 @@ public abstract class AbstractConfigured
 
     }
 
-    public final void quiesce()
-    {
-        setDesiredState(State.QUIESCED);
-    }
-
     public final void stop()
     {
         setDesiredState(State.STOPPED);

Modified: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/FileBasedGroupProviderImpl.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/FileBasedGroupProviderImpl.java?rev=1593576&r1=1593575&r2=1593576&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/FileBasedGroupProviderImpl.java
(original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/FileBasedGroupProviderImpl.java
Fri May  9 16:34:53 2014
@@ -270,7 +270,7 @@ public class FileBasedGroupProviderImpl
         return _broker.getSecurityManager();
     }
 
-    @StateTransition( currentState = { State.UNINITIALIZED, State.QUIESCED, State.STOPPED
}, desiredState = State.ACTIVE )
+    @StateTransition( currentState = { State.UNINITIALIZED, State.QUIESCED }, desiredState
= State.ACTIVE )
     private void activate()
     {
         try
@@ -288,7 +288,7 @@ public class FileBasedGroupProviderImpl
         }
     }
 
-    @StateTransition( currentState = { State.QUIESCED, State.ACTIVE, State.STOPPED, State.ERRORED},
desiredState = State.DELETED )
+    @StateTransition( currentState = { State.QUIESCED, State.ACTIVE, State.ERRORED}, desiredState
= State.DELETED )
     private void doDelete()
     {
         File file = new File(getPath());
@@ -304,14 +304,6 @@ public class FileBasedGroupProviderImpl
         _state.set(State.DELETED);
     }
 
-
-    @StateTransition( currentState = { State.UNINITIALIZED, State.ACTIVE, State.QUIESCED},
desiredState = State.STOPPED )
-    private void doStop()
-    {
-        // TODO - this seem inadequate :-)
-        _state.set(State.STOPPED);
-    }
-
     @StateTransition( currentState = State.UNINITIALIZED, desiredState = State.QUIESCED)
     private void startQuiesced()
     {

Modified: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/FileSystemPreferencesProviderImpl.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/FileSystemPreferencesProviderImpl.java?rev=1593576&r1=1593575&r2=1593576&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/FileSystemPreferencesProviderImpl.java
(original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/adapter/FileSystemPreferencesProviderImpl.java
Fri May  9 16:34:53 2014
@@ -132,13 +132,6 @@ public class FileSystemPreferencesProvid
         return super.getAttribute(name);
     }
 
-    @StateTransition(currentState = { State.ACTIVE, State.QUIESCED }, desiredState = State.STOPPED)
-    private void doStop()
-    {
-        close();
-        _state = State.STOPPED;
-    }
-
     protected void onClose()
     {
         if(_store != null)
@@ -157,7 +150,7 @@ public class FileSystemPreferencesProvid
         _state = State.QUIESCED;
     }
 
-    @StateTransition(currentState = { State.ACTIVE, State.QUIESCED, State.STOPPED, State.ERRORED
}, desiredState = State.DELETED )
+    @StateTransition(currentState = { State.ACTIVE, State.QUIESCED, State.ERRORED }, desiredState
= State.DELETED )
     private void doDelete()
     {
         close();
@@ -172,7 +165,7 @@ public class FileSystemPreferencesProvid
         _state = State.DELETED;
     }
 
-    @StateTransition(currentState = { State.QUIESCED, State.STOPPED, State.ERRORED }, desiredState
= State.ACTIVE )
+    @StateTransition(currentState = { State.QUIESCED, State.ERRORED }, desiredState = State.ACTIVE
)
     private void restart()
     {
         _store.open();

Modified: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/AbstractPort.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/AbstractPort.java?rev=1593576&r1=1593575&r2=1593576&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/AbstractPort.java
(original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/model/port/AbstractPort.java
Fri May  9 16:34:53 2014
@@ -293,21 +293,14 @@ abstract public class AbstractPort<X ext
         return super.getAttribute(name);
     }
 
-    @StateTransition(currentState = { State.ACTIVE, State.QUIESCED, State.STOPPED, State.ERRORED},
desiredState = State.DELETED )
+    @StateTransition(currentState = { State.ACTIVE, State.QUIESCED, State.ERRORED}, desiredState
= State.DELETED )
     private void doDelete()
     {
         close();
         _state = State.DELETED;
     }
 
-    @StateTransition(currentState = { State.ACTIVE, State.QUIESCED,  State.ERRORED}, desiredState
= State.STOPPED )
-    private void doStop()
-    {
-        close();
-        _state = State.STOPPED;
-    }
-
-    @StateTransition( currentState = {State.UNINITIALIZED, State.QUIESCED, State.STOPPED},
desiredState = State.ACTIVE )
+    @StateTransition( currentState = {State.UNINITIALIZED, State.QUIESCED}, desiredState
= State.ACTIVE )
     protected void activate()
     {
         try
@@ -322,6 +315,13 @@ abstract public class AbstractPort<X ext
         }
     }
 
+    @StateTransition( currentState = State.UNINITIALIZED, desiredState = State.QUIESCED)
+    private void startQuiesced()
+    {
+        _state = State.QUIESCED;
+    }
+
+
     protected State onActivate()
     {
         // no-op: expected to be overridden by subclass

Modified: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/AbstractAuthenticationManager.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/AbstractAuthenticationManager.java?rev=1593576&r1=1593575&r2=1593576&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/AbstractAuthenticationManager.java
(original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/auth/manager/AbstractAuthenticationManager.java
Fri May  9 16:34:53 2014
@@ -180,13 +180,6 @@ public abstract class AbstractAuthentica
         }
     }
 
-    @StateTransition( currentState = { State.ACTIVE, State.QUIESCED, State.ERRORED, State.UNINITIALIZED
} , desiredState = State.STOPPED )
-    protected void doStop()
-    {
-        close();
-        _state.set(State.STOPPED);
-    }
-
     @StateTransition( currentState = State.UNINITIALIZED, desiredState = State.QUIESCED )
     protected void startQuiesced()
     {
@@ -215,7 +208,7 @@ public abstract class AbstractAuthentica
 
     }
 
-    @StateTransition( currentState = { State.ACTIVE, State.STOPPED, State.QUIESCED, State.ERRORED},
desiredState = State.DELETED)
+    @StateTransition( currentState = { State.ACTIVE, State.QUIESCED, State.ERRORED}, desiredState
= State.DELETED)
     protected void doDelete()
     {
 

Modified: qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java?rev=1593576&r1=1593575&r2=1593576&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java
(original)
+++ qpid/trunk/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java
Fri May  9 16:34:53 2014
@@ -702,13 +702,6 @@ public abstract class AbstractVirtualHos
         return _broker.getSecurityManager();
     }
 
-    @StateTransition( currentState = { State.ACTIVE, State.QUIESCED, State.ERRORED}, desiredState
= State.STOPPED )
-    public void doStop()
-    {
-        close();
-        _state = VirtualHostState.STOPPED;
-    }
-
     protected void onClose()
     {
         //Stop Connections
@@ -1252,7 +1245,7 @@ public abstract class AbstractVirtualHos
         return _housekeepingThreadCount;
     }
 
-    @StateTransition( currentState = { State.ACTIVE, State.QUIESCED, State.ERRORED, State.STOPPED},
desiredState = State.DELETED )
+    @StateTransition( currentState = { State.ACTIVE, State.QUIESCED, State.ERRORED }, desiredState
= State.DELETED )
     private void doDelete()
     {
         if(_deleted.compareAndSet(false,true))
@@ -1439,7 +1432,7 @@ public abstract class AbstractVirtualHos
         getDurableConfigurationStore().create(new ConfiguredObjectRecordImpl(record.getId(),
record.getType(), record.getAttributes()));
     }
 
-    @StateTransition( currentState = {State.UNINITIALIZED, State.STOPPED, State.ERRORED,
State.QUIESCED}, desiredState = State.ACTIVE )
+    @StateTransition( currentState = {State.UNINITIALIZED, State.ERRORED, State.QUIESCED},
desiredState = State.ACTIVE )
     protected void activate()
     {
         _houseKeepingTasks = new ScheduledThreadPoolExecutor(getHousekeepingThreadCount());

Modified: qpid/trunk/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/ACLFileAccessControlProviderImpl.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/ACLFileAccessControlProviderImpl.java?rev=1593576&r1=1593575&r2=1593576&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/ACLFileAccessControlProviderImpl.java
(original)
+++ qpid/trunk/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/ACLFileAccessControlProviderImpl.java
Fri May  9 16:34:53 2014
@@ -140,13 +140,6 @@ public class ACLFileAccessControlProvide
         }
     }
 
-    @StateTransition(currentState = {State.ACTIVE, State.QUIESCED}, desiredState = State.STOPPED)
-    private void doStop()
-    {
-        close();
-        _state.set(State.STOPPED);
-    }
-
     @Override
     protected void onClose()
     {
@@ -160,7 +153,7 @@ public class ACLFileAccessControlProvide
         _state.set(State.QUIESCED);
     }
 
-    @StateTransition(currentState = {State.ACTIVE, State.QUIESCED, State.STOPPED, State.ERRORED},
desiredState = State.DELETED)
+    @StateTransition(currentState = {State.ACTIVE, State.QUIESCED, State.ERRORED}, desiredState
= State.DELETED)
     private void doDelete()
     {
         close();

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagement.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagement.java?rev=1593576&r1=1593575&r2=1593576&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagement.java
(original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagement.java
Fri May  9 16:34:53 2014
@@ -136,13 +136,6 @@ public class HttpManagement extends Abst
         setCurrentState(State.ACTIVE);
     }
 
-    @StateTransition(currentState = State.ACTIVE, desiredState = State.STOPPED)
-    private void doStop()
-    {
-        close();
-        setCurrentState(State.STOPPED);
-    }
-
     @Override
     protected void onClose()
     {

Modified: qpid/trunk/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/JMXManagementPluginImpl.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/JMXManagementPluginImpl.java?rev=1593576&r1=1593575&r2=1593576&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/JMXManagementPluginImpl.java
(original)
+++ qpid/trunk/qpid/java/broker-plugins/management-jmx/src/main/java/org/apache/qpid/server/jmx/JMXManagementPluginImpl.java
Fri May  9 16:34:53 2014
@@ -221,13 +221,6 @@ public class JMXManagementPluginImpl
         return port.getAvailableProtocols().contains(Protocol.RMI);
     }
 
-    @StateTransition( currentState = State.ACTIVE, desiredState = State.STOPPED )
-    private void doStop()
-    {
-        close();
-        setCurrentState(State.STOPPED);
-    }
-
     @Override
     protected void onClose()
     {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message