Remove @(Not)ThreadSafe annotation
[mdsal.git] / singleton-service / mdsal-singleton-dom-impl / src / main / java / org / opendaylight / mdsal / singleton / dom / impl / ClusterSingletonServiceGroupImpl.java
index 7570a4bbfeb3e08a19078c31af97eec5e5905db5..1d83e09e9db769666c15fad6c7439a5ab8f167b4 100644 (file)
@@ -31,9 +31,7 @@ import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
 import java.util.concurrent.atomic.AtomicReference;
-import javax.annotation.CheckReturnValue;
 import javax.annotation.concurrent.GuardedBy;
-import javax.annotation.concurrent.ThreadSafe;
 import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.mdsal.eos.common.api.CandidateAlreadyRegisteredException;
 import org.opendaylight.mdsal.eos.common.api.EntityOwnershipChangeState;
@@ -49,7 +47,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Implementation of {@link ClusterSingletonServiceGroup} on top of the Entitiy Ownership Service. Since EOS is atomic
+ * Implementation of {@link ClusterSingletonServiceGroup} on top of the Entity Ownership Service. Since EOS is atomic
  * in its operation and singleton services incur startup and most notably cleanup, we need to do something smart here.
  *
  * <p>
@@ -70,7 +68,6 @@ import org.slf4j.LoggerFactory;
  * @param <G> the GenericEntityOwnershipListener type
  * @param <S> the GenericEntityOwnershipService type
  */
-@ThreadSafe
 final class ClusterSingletonServiceGroupImpl<P extends Path<P>, E extends GenericEntity<P>,
         C extends GenericEntityOwnershipChange<P, E>,  G extends GenericEntityOwnershipListener<P, C>,
         S extends GenericEntityOwnershipService<P, E, G>> extends ClusterSingletonServiceGroup<P, E, C> {
@@ -280,7 +277,6 @@ final class ClusterSingletonServiceGroupImpl<P extends Path<P>, E extends Generi
         reconcileState();
     }
 
-    @CheckReturnValue
     @Override
     ListenableFuture<?> unregisterService(final ClusterSingletonServiceRegistration reg) {
         final ClusterSingletonService service = reg.getInstance();
@@ -332,7 +328,7 @@ final class ClusterSingletonServiceGroupImpl<P extends Path<P>, E extends Generi
 
         if (isDirty()) {
             if (!tryLock()) {
-                LOG.debug("Service group {} postponing ownership change sync");
+                LOG.debug("Service group {} postponing ownership change sync", identifier);
                 return;
             }