Interface ContextChain
- All Superinterfaces:
- AutoCloseable,- org.opendaylight.mdsal.singleton.api.ClusterSingletonService,- DeviceInitializationContext,- org.opendaylight.yangtools.concepts.Identifiable<org.opendaylight.mdsal.singleton.api.ServiceGroupIdentifier>,- ReconciliationFrameworkStep
- All Known Implementing Classes:
- ContextChainImpl
public interface ContextChain
extends org.opendaylight.mdsal.singleton.api.ClusterSingletonService, AutoCloseable, ReconciliationFrameworkStep, DeviceInitializationContext
Chain of contexts, hold references to the contexts.
- Since:
- 0.4.0 Carbon
- 
Method SummaryModifier and TypeMethodDescriptionbooleanaddAuxiliaryConnection(@NonNull ConnectionContext connectionContext) Add new auxiliary connection if primary is ok.<T extends OFPContext>
 voidaddContext(@NonNull T context) Add context to the chain, if reference already exist ignore it.booleanauxiliaryConnectionDropped(@NonNull ConnectionContext connectionContext) Check if connection is auxiliary and if yes then continue working.voidclose()booleanChecks if context chain is currently closing.booleanisMastered(@NonNull ContextChainMastershipState mastershipState, boolean inReconciliationFrameworkStep) Check all needed to be master.voidSlave was successfully set.voidregisterDeviceRemovedHandler(@NonNull DeviceRemovedHandler deviceRemovedHandler) This method registers device removed handler what will be executed when device should be removed.voidregisterServices(org.opendaylight.mdsal.singleton.api.ClusterSingletonServiceProvider clusterSingletonServiceProvider) Registers context chain into cluster singleton service.Methods inherited from interface org.opendaylight.mdsal.singleton.api.ClusterSingletonServicecloseServiceInstance, instantiateServiceInstanceMethods inherited from interface org.opendaylight.openflowplugin.api.openflow.lifecycle.DeviceInitializationContextinitializeDeviceMethods inherited from interface org.opendaylight.yangtools.concepts.IdentifiablegetIdentifierMethods inherited from interface org.opendaylight.openflowplugin.api.openflow.lifecycle.ReconciliationFrameworkStepcontinueInitializationAfterReconciliation
- 
Method Details- 
addContextAdd context to the chain, if reference already exist ignore it.- Parameters:
- context- child of OFPContext
 
- 
closevoid close()- Specified by:
- closein interface- AutoCloseable
 
- 
makeContextChainStateSlavevoid makeContextChainStateSlave()Slave was successfully set.
- 
registerServicesvoid registerServices(org.opendaylight.mdsal.singleton.api.ClusterSingletonServiceProvider clusterSingletonServiceProvider) Registers context chain into cluster singleton service.- Parameters:
- clusterSingletonServiceProvider- provider
 
- 
isMasteredboolean isMastered(@NonNull ContextChainMastershipState mastershipState, boolean inReconciliationFrameworkStep) Check all needed to be master.- Parameters:
- mastershipState- state master on device, initial gather, initial submit, initial registry fill
- inReconciliationFrameworkStep- 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.
- Returns:
- true if everything done fine
- See Also:
 
- 
isClosingboolean isClosing()Checks if context chain is currently closing.- Returns:
- true if context chain is closing
 
- 
addAuxiliaryConnectionAdd new auxiliary connection if primary is ok.- Parameters:
- connectionContext- new connection to the device.
- Returns:
- false if primary connection is broken
 
- 
auxiliaryConnectionDroppedCheck if connection is auxiliary and if yes then continue working.- Parameters:
- connectionContext- connection to the device
- Returns:
- false if this is primary connection
 
- 
registerDeviceRemovedHandlerThis method registers device removed handler what will be executed when device should be removed.- Parameters:
- deviceRemovedHandler- device removed handler
 
 
-