public class ContextChainImpl extends Object implements ContextChain
| Modifier and Type | Method and Description |
|---|---|
boolean |
addAuxiliaryConnection(ConnectionContext connectionContext)
Add new auxiliary connection if primary is ok.
|
<T extends OFPContext> |
addContext(T context)
Add context to the chain, if reference already exist ignore it.
|
boolean |
auxiliaryConnectionDropped(ConnectionContext connectionContext)
Check if connection is auxiliary and if yes then continue working.
|
void |
close() |
com.google.common.util.concurrent.ListenableFuture<?> |
closeServiceInstance() |
void |
continueInitializationAfterReconciliation()
Allow to continue after reconciliation framework callback success.
|
org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier |
getIdentifier() |
void |
instantiateServiceInstance() |
boolean |
isClosing()
Checks if context chain is currently closing.
|
boolean |
isMastered(ContextChainMastershipState mastershipState,
boolean inReconciliationFrameworkStep)
Check all needed to be master.
|
void |
makeContextChainStateSlave()
Slave was successfully set.
|
void |
registerDeviceRemovedHandler(DeviceRemovedHandler deviceRemovedHandler)
This method registers device removed handler what will be executed when device should be removed.
|
void |
registerServices(org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider clusterSingletonServiceProvider)
Registers context chain into cluster singleton service.
|
public <T extends OFPContext> void addContext(@Nonnull T context)
ContextChainaddContext in interface ContextChaincontext - child of OFPContextpublic void instantiateServiceInstance()
instantiateServiceInstance in interface org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServicepublic com.google.common.util.concurrent.ListenableFuture<?> closeServiceInstance()
closeServiceInstance in interface org.opendaylight.mdsal.singleton.common.api.ClusterSingletonService@Nonnull public org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier getIdentifier()
getIdentifier in interface org.opendaylight.yangtools.concepts.Identifiable<org.opendaylight.mdsal.singleton.common.api.ServiceGroupIdentifier>public void close()
close in interface AutoCloseableclose in interface ContextChainpublic void makeContextChainStateSlave()
ContextChainmakeContextChainStateSlave in interface ContextChainpublic void registerServices(org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider clusterSingletonServiceProvider)
ContextChainregisterServices in interface ContextChainclusterSingletonServiceProvider - providerpublic boolean isMastered(@Nonnull ContextChainMastershipState mastershipState, boolean inReconciliationFrameworkStep)
ContextChainisMastered in interface ContextChainmastershipState - state master on device, initial gather, initial submit, initial registry fillinReconciliationFrameworkStep - if true, check all needed to be master except the device is written
into data store. Using by reconciliation framework. Used only if
ReconciliationFrameworkRegistrar.isReconciliationFrameworkRegistered() is
set to true.MastershipChangeServicepublic boolean isClosing()
ContextChainisClosing in interface ContextChainpublic void continueInitializationAfterReconciliation()
ReconciliationFrameworkStepcontinueInitializationAfterReconciliation in interface ReconciliationFrameworkStepMastershipChangeService,
ReconciliationFrameworkRegistrar.isReconciliationFrameworkRegistered()public boolean addAuxiliaryConnection(@Nonnull ConnectionContext connectionContext)
ContextChainaddAuxiliaryConnection in interface ContextChainconnectionContext - new connection to the device.public boolean auxiliaryConnectionDropped(@Nonnull ConnectionContext connectionContext)
ContextChainauxiliaryConnectionDropped in interface ContextChainconnectionContext - connection to the devicepublic void registerDeviceRemovedHandler(@Nonnull DeviceRemovedHandler deviceRemovedHandler)
ContextChainregisterDeviceRemovedHandler in interface ContextChaindeviceRemovedHandler - device removed handlerCopyright © 2019 OpenDaylight. All rights reserved.