Class GuardedContextImpl
- java.lang.Object
 - 
- org.opendaylight.openflowplugin.impl.lifecycle.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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()com.google.common.util.concurrent.ListenableFuture<?>closeServiceInstance()DeviceInfogetDeviceInfo()Get device info.@NonNull org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifiergetIdentifier()voidinstantiateServiceInstance()<T> Tmap(Function<OFPContext,T> transformer)Maps delegate inside guarded context to T.voidregisterMastershipWatcher(@NonNull ContextChainMastershipWatcher contextChainMastershipWatcher)Registers mastership change listener to context.com.google.common.util.concurrent.Service.Statestate()Returns the lifecycle state of the service.StringtoString() 
 - 
 
- 
- 
Method Detail
- 
state
public com.google.common.util.concurrent.Service.State state()
Description copied from interface:GuardedContextReturns the lifecycle state of the service.- Specified by:
 statein interfaceGuardedContext- Returns:
 - the service state
 
 
- 
map
public <T> T map(Function<OFPContext,T> transformer)
Description copied from interface:GuardedContextMaps delegate inside guarded context to T.- Specified by:
 mapin interfaceGuardedContext- Type Parameters:
 T- the type parameter- Parameters:
 transformer- the transformer- Returns:
 - the t
 
 
- 
instantiateServiceInstance
public void instantiateServiceInstance()
- Specified by:
 instantiateServiceInstancein interfaceorg.opendaylight.mdsal.singleton.common.api.ClusterSingletonService
 
- 
closeServiceInstance
public com.google.common.util.concurrent.ListenableFuture<?> closeServiceInstance()
- Specified by:
 closeServiceInstancein interfaceorg.opendaylight.mdsal.singleton.common.api.ClusterSingletonService
 
- 
getIdentifier
public @NonNull org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier getIdentifier()
- Specified by:
 getIdentifierin interfaceorg.opendaylight.yangtools.concepts.Identifiable<org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier>
 
- 
getDeviceInfo
public DeviceInfo getDeviceInfo()
Description copied from interface:OFPContextGet device info.- Specified by:
 getDeviceInfoin interfaceOFPContext- Returns:
 - device info
 
 
- 
registerMastershipWatcher
public void registerMastershipWatcher(@NonNull ContextChainMastershipWatcher contextChainMastershipWatcher)
Description copied from interface:OFPContextRegisters mastership change listener to context.- Specified by:
 registerMastershipWatcherin interfaceOFPContext- Parameters:
 contextChainMastershipWatcher- mastership change listener
 
- 
close
public void close()
- Specified by:
 closein interfaceAutoCloseable- Specified by:
 closein interfaceOFPContext
 
 - 
 
 -