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<Void> |
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)
ContextChain
addContext
in interface ContextChain
context
- child of OFPContextpublic void instantiateServiceInstance()
instantiateServiceInstance
in interface org.opendaylight.mdsal.singleton.common.api.ClusterSingletonService
public com.google.common.util.concurrent.ListenableFuture<Void> 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 AutoCloseable
close
in interface ContextChain
public void makeContextChainStateSlave()
ContextChain
makeContextChainStateSlave
in interface ContextChain
public void registerServices(org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider clusterSingletonServiceProvider)
ContextChain
registerServices
in interface ContextChain
clusterSingletonServiceProvider
- providerpublic boolean isMastered(@Nonnull ContextChainMastershipState mastershipState, boolean inReconciliationFrameworkStep)
ContextChain
isMastered
in interface ContextChain
mastershipState
- 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.MastershipChangeService
public boolean isClosing()
ContextChain
isClosing
in interface ContextChain
public void continueInitializationAfterReconciliation()
ReconciliationFrameworkStep
continueInitializationAfterReconciliation
in interface ReconciliationFrameworkStep
MastershipChangeService
,
ReconciliationFrameworkRegistrar.isReconciliationFrameworkRegistered()
public boolean addAuxiliaryConnection(@Nonnull ConnectionContext connectionContext)
ContextChain
addAuxiliaryConnection
in interface ContextChain
connectionContext
- new connection to the device.public boolean auxiliaryConnectionDropped(@Nonnull ConnectionContext connectionContext)
ContextChain
auxiliaryConnectionDropped
in interface ContextChain
connectionContext
- connection to the devicepublic void registerDeviceRemovedHandler(@Nonnull DeviceRemovedHandler deviceRemovedHandler)
ContextChain
registerDeviceRemovedHandler
in interface ContextChain
deviceRemovedHandler
- device removed handlerCopyright © 2018 OpenDaylight. All rights reserved.