Merge "Introduce ASYNC caches and use them in FRM"
[controller.git] / opendaylight / clustering / services / src / main / java / org / opendaylight / controller / clustering / services / IClusterServices.java
index 68960baa07a0d157b1c101fbdb6832208e54376c..77e300e95aaa7475b276fa10eaa8f37bb9326d5b 100644 (file)
@@ -10,7 +10,7 @@
 /**
  * @file   IClusterServices.java
  *
- * @brief  : Set of services and application will expect from the
+ * @brief  : Set of services an application will expect from the
  * clustering services provider
  *
  * Contract between the applications and the clustering service
@@ -33,7 +33,7 @@ import javax.transaction.SystemException;
 import javax.transaction.Transaction;
 
 /**
- * Set of services and application will expect from the
+ * Set of services an application will expect from the
  * clustering services provider
  *
  */
@@ -62,7 +62,19 @@ public interface IClusterServices {
          * immediately committed in the cache.
          *
          */
-        NON_TRANSACTIONAL;
+        NON_TRANSACTIONAL,
+        /**
+         * Set on a cache that can transfer the updates asynchronously from the
+         * calling thread. The caller when doing put/clear/remove cannot expect
+         * that the operation has happened clusterwide
+         */
+        ASYNC,
+        /**
+         * Set on a cache that transfer the updates synchronously to the calling
+         * thread so when getting back the operation is supposed to have
+         * completed on all the cluster nodes. Slow but safe.
+         */
+        SYNC;
     }
 
     /**
@@ -71,19 +83,19 @@ public interface IClusterServices {
      */
     public enum cacheProps {
         /**
-         * The property returned describe the caracteristics of the
+         * The property returned describe the characteristics of the
          * transaction setup for the cache it was retrieved.
          */
         TRANSACTION_PROP,
         /**
          * The property returned report the clustering
-         * caracteristics of the cache for which property was
+         * characteristics of the cache for which property was
          * queried.
          */
         CLUSTERING_PROP,
         /**
          * The property returned reports the locking
-         * caracteristics of the cache for which the property was
+         * characteristics of the cache for which the property was
          * queried
          */
         LOCKING_PROP;
@@ -237,6 +249,7 @@ public interface IClusterServices {
      *
      * @return true if the role is the one of standby, else false
      */
+    @Deprecated
     boolean amIStandby();
 
     /**
@@ -247,6 +260,7 @@ public interface IClusterServices {
      *
      * @return Address of the active controller
      */
+    @Deprecated
     InetAddress getActiveAddress();
 
     /**
@@ -271,6 +285,7 @@ public interface IClusterServices {
      *
      * @param i Interface that will be called when the Role Change happens
      */
+    @Deprecated
     void listenRoleChange(IListenRoleChange i)
             throws ListenRoleChangeAddException;
 
@@ -281,5 +296,6 @@ public interface IClusterServices {
      *
      * @param i Interface that will be called when the Role Change happens
      */
+    @Deprecated
     void unlistenRoleChange(IListenRoleChange i);
 }