Addding a new method to let the clients of clustering service
[controller.git] / opendaylight / clustering / services_implementation / src / main / java / org / opendaylight / controller / clustering / services_implementation / internal / ClusterManagerCommon.java
index 9ee00484ce573123778226c0a298b3203b3ba116..97d9ded6c86b864f06356ff026bd170cc6dbe4d5 100644 (file)
@@ -19,12 +19,15 @@ import java.util.Properties;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.TimeUnit;
+
 import javax.transaction.HeuristicMixedException;
 import javax.transaction.HeuristicRollbackException;
 import javax.transaction.NotSupportedException;
 import javax.transaction.RollbackException;
 import javax.transaction.SystemException;
 import javax.transaction.Transaction;
+
 import org.apache.felix.dm.Component;
 import org.opendaylight.controller.clustering.services.CacheConfigException;
 import org.opendaylight.controller.clustering.services.CacheExistException;
@@ -255,6 +258,15 @@ public abstract class ClusterManagerCommon implements IClusterServicesCommon {
         }
     }
 
+    @Override
+    public void tbegin(long timeout, TimeUnit unit) throws NotSupportedException, SystemException {
+        if (this.clusterService != null) {
+            this.clusterService.tbegin(timeout, unit);
+        } else {
+            throw new IllegalStateException();
+        }
+    }
+
     @Override
     public void tcommit() throws RollbackException, HeuristicMixedException,
             HeuristicRollbackException, java.lang.SecurityException,