public abstract class AbstractPingpongDataBrokerModule extends AbstractModule<AbstractPingpongDataBrokerModule> implements PingpongDataBrokerModuleMXBean, DOMDataBrokerServiceInterface
Modifier and Type | Field and Description |
---|---|
static JmxAttribute |
dataBrokerJmxAttribute |
dependencyResolver, identifier
Constructor and Description |
---|
AbstractPingpongDataBrokerModule(ModuleIdentifier identifier,
DependencyResolver dependencyResolver) |
AbstractPingpongDataBrokerModule(ModuleIdentifier identifier,
DependencyResolver dependencyResolver,
AbstractPingpongDataBrokerModule oldModule,
AutoCloseable oldInstance) |
Modifier and Type | Method and Description |
---|---|
boolean |
canReuseInstance(AbstractPingpongDataBrokerModule oldModule)
Users are welcome to override this method to provide custom logic for
advanced reusability detection.
|
protected void |
customValidation() |
boolean |
equals(Object o) |
ObjectName |
getDataBroker() |
protected DOMDataBroker |
getDataBrokerDependency() |
org.slf4j.Logger |
getLogger() |
int |
hashCode() |
boolean |
isSame(AbstractPingpongDataBrokerModule other) |
protected void |
resolveDependencies()
Inject all the dependencies using dependency resolver instance.
|
AutoCloseable |
reuseInstance(AutoCloseable oldInstance)
By default the oldInstance is returned since this method is by default called
only if the oldModule had the same configuration and dependencies configured.
|
void |
setDataBroker(ObjectName dataBroker) |
void |
validate()
This method will be called as first phase in two phase commit.
|
canReuse, createInstance, getIdentifier, getInstance, setCanReuseInstance
public static final JmxAttribute dataBrokerJmxAttribute
public AbstractPingpongDataBrokerModule(ModuleIdentifier identifier, DependencyResolver dependencyResolver)
public AbstractPingpongDataBrokerModule(ModuleIdentifier identifier, DependencyResolver dependencyResolver, AbstractPingpongDataBrokerModule oldModule, AutoCloseable oldInstance)
public void validate()
Module
Module.getInstance()
on
dependent Module
because it would destroy separation between
validation and commit phase.protected void customValidation()
protected final DOMDataBroker getDataBrokerDependency()
protected final void resolveDependencies()
AbstractModule
resolveDependencies
in class AbstractModule<AbstractPingpongDataBrokerModule>
public boolean canReuseInstance(AbstractPingpongDataBrokerModule oldModule)
AbstractModule
canReuseInstance
in class AbstractModule<AbstractPingpongDataBrokerModule>
oldModule
- old instance of a Modulepublic AutoCloseable reuseInstance(AutoCloseable oldInstance)
AbstractModule
reuseInstance
in class AbstractModule<AbstractPingpongDataBrokerModule>
oldInstance
- old instance of a class wrapped by the modulepublic boolean isSame(AbstractPingpongDataBrokerModule other)
public ObjectName getDataBroker()
getDataBroker
in interface PingpongDataBrokerModuleMXBean
public void setDataBroker(ObjectName dataBroker)
setDataBroker
in interface PingpongDataBrokerModuleMXBean
public org.slf4j.Logger getLogger()
Copyright © 2019 OpenDaylight. All rights reserved.