Class GuardedContextImpl
java.lang.Object
org.opendaylight.openflowplugin.impl.lifecycle.GuardedContextImpl
- All Implemented Interfaces:
AutoCloseable
,org.opendaylight.mdsal.singleton.api.ClusterSingletonService
,GuardedContext
,OFPContext
,org.opendaylight.yangtools.concepts.Identifiable<org.opendaylight.mdsal.singleton.api.ServiceGroupIdentifier>
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
com.google.common.util.concurrent.ListenableFuture<?>
Get device info.@NonNull org.opendaylight.mdsal.singleton.api.ServiceGroupIdentifier
void
<T> T
map
(Function<OFPContext, T> transformer) Maps delegate inside guarded context to T.void
registerMastershipWatcher
(@NonNull ContextChainMastershipWatcher contextChainMastershipWatcher) Registers mastership change listener to context.com.google.common.util.concurrent.Service.State
state()
Returns the lifecycle state of the service.toString()
-
Method Details
-
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 interfaceGuardedContext
- Returns:
- the service state
-
map
Description copied from interface:GuardedContext
Maps delegate inside guarded context to T.- Specified by:
map
in interfaceGuardedContext
- Type Parameters:
T
- the type parameter- Parameters:
transformer
- the transformer- Returns:
- the t
-
instantiateServiceInstance
public void instantiateServiceInstance()- Specified by:
instantiateServiceInstance
in interfaceorg.opendaylight.mdsal.singleton.api.ClusterSingletonService
-
closeServiceInstance
public com.google.common.util.concurrent.ListenableFuture<?> closeServiceInstance()- Specified by:
closeServiceInstance
in interfaceorg.opendaylight.mdsal.singleton.api.ClusterSingletonService
-
getIdentifier
public @NonNull org.opendaylight.mdsal.singleton.api.ServiceGroupIdentifier getIdentifier()- Specified by:
getIdentifier
in interfaceorg.opendaylight.yangtools.concepts.Identifiable<org.opendaylight.mdsal.singleton.api.ServiceGroupIdentifier>
-
toString
-
getDeviceInfo
Description copied from interface:OFPContext
Get device info.- Specified by:
getDeviceInfo
in interfaceOFPContext
- Returns:
- device info
-
registerMastershipWatcher
public void registerMastershipWatcher(@NonNull ContextChainMastershipWatcher contextChainMastershipWatcher) Description copied from interface:OFPContext
Registers mastership change listener to context.- Specified by:
registerMastershipWatcher
in interfaceOFPContext
- Parameters:
contextChainMastershipWatcher
- mastership change listener
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceOFPContext
-