Class GuardedContextImpl

  • All Implemented Interfaces:
    AutoCloseable, org.opendaylight.mdsal.singleton.common.api.ClusterSingletonService, GuardedContext, OFPContext, org.opendaylight.yangtools.concepts.Identifiable<org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier>

    public class GuardedContextImpl
    extends Object
    implements GuardedContext
    • Method Detail

      • state

        public com.google.common.util.concurrent.Service.State state()
        Description copied from interface: GuardedContext
        Returns the lifecycle state of the service.
        Specified by:
        state in interface GuardedContext
        Returns:
        the service state
      • map

        public <T> T map​(Function<OFPContext,​T> transformer)
        Description copied from interface: GuardedContext
        Maps delegate inside guarded context to T.
        Specified by:
        map in interface GuardedContext
        Type Parameters:
        T - the type parameter
        Parameters:
        transformer - the transformer
        Returns:
        the t
      • instantiateServiceInstance

        public void instantiateServiceInstance()
        Specified by:
        instantiateServiceInstance in interface org.opendaylight.mdsal.singleton.common.api.ClusterSingletonService
      • closeServiceInstance

        public com.google.common.util.concurrent.ListenableFuture<?> closeServiceInstance()
        Specified by:
        closeServiceInstance in interface org.opendaylight.mdsal.singleton.common.api.ClusterSingletonService
      • getIdentifier

        public @NonNull org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier getIdentifier()
        Specified by:
        getIdentifier in interface org.opendaylight.yangtools.concepts.Identifiable<org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier>
      • registerMastershipWatcher

        public void registerMastershipWatcher​(@NonNull ContextChainMastershipWatcher contextChainMastershipWatcher)
        Description copied from interface: OFPContext
        Registers mastership change listener to context.
        Specified by:
        registerMastershipWatcher in interface OFPContext
        Parameters:
        contextChainMastershipWatcher - mastership change listener