X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fclustering%2Fservices%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fclustering%2Fservices%2FIClusterServices.java;h=b3427c7fcc13d77b43afd4666c788f21386cdbb6;hb=0453a062c587b03363c35e7989294b0933bb9895;hp=5551f23f7220fe0908f0ab37faa9858cca956a75;hpb=c983d7c605bf432e9637b2608d4bce3bd1446808;p=controller.git diff --git a/opendaylight/clustering/services/src/main/java/org/opendaylight/controller/clustering/services/IClusterServices.java b/opendaylight/clustering/services/src/main/java/org/opendaylight/controller/clustering/services/IClusterServices.java index 5551f23f72..b3427c7fcc 100644 --- a/opendaylight/clustering/services/src/main/java/org/opendaylight/controller/clustering/services/IClusterServices.java +++ b/opendaylight/clustering/services/src/main/java/org/opendaylight/controller/clustering/services/IClusterServices.java @@ -24,6 +24,7 @@ import java.util.List; import java.util.Properties; import java.util.Set; import java.util.concurrent.ConcurrentMap; +import java.util.concurrent.TimeUnit; import javax.transaction.HeuristicMixedException; import javax.transaction.HeuristicRollbackException; @@ -62,7 +63,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; } /** @@ -203,6 +216,16 @@ public interface IClusterServices { */ void tbegin() throws NotSupportedException, SystemException; + /** + * tbegin with a timeout + * @see IClusterServices#tbegin + * @param timeout the transaction timeout + * @param unit TimeUnit for the timeout + * @throws NotSupportedException + * @throws SystemException + */ + void tbegin(long timeout, TimeUnit unit) throws NotSupportedException, SystemException; + /** * Commit a transaction covering all the data structures/HW updates. */ @@ -237,6 +260,7 @@ public interface IClusterServices { * * @return true if the role is the one of standby, else false */ + @Deprecated boolean amIStandby(); /** @@ -247,6 +271,7 @@ public interface IClusterServices { * * @return Address of the active controller */ + @Deprecated InetAddress getActiveAddress(); /** @@ -271,6 +296,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 +307,6 @@ public interface IClusterServices { * * @param i Interface that will be called when the Role Change happens */ + @Deprecated void unlistenRoleChange(IListenRoleChange i); }