public abstract class AbstractMultipleDependenciesModule extends AbstractModule<AbstractMultipleDependenciesModule> implements MultipleDependenciesModuleMXBean, CheckedAutoCloseableServiceInterface
Modifier and Type | Field and Description |
---|---|
static JmxAttribute |
simpleJmxAttribute |
static JmxAttribute |
singleJmxAttribute |
static JmxAttribute |
testingDepsJmxAttribute |
dependencyResolver, identifier
Constructor and Description |
---|
AbstractMultipleDependenciesModule(ModuleIdentifier identifier,
DependencyResolver dependencyResolver) |
AbstractMultipleDependenciesModule(ModuleIdentifier identifier,
DependencyResolver dependencyResolver,
AbstractMultipleDependenciesModule oldModule,
AutoCloseable oldInstance) |
Modifier and Type | Method and Description |
---|---|
boolean |
canReuseInstance(AbstractMultipleDependenciesModule oldModule)
Users are welcome to override this method to provide custom logic for
advanced reusability detection.
|
protected void |
customValidation() |
boolean |
equals(Object o) |
org.slf4j.Logger |
getLogger() |
Boolean |
getSimple() |
ObjectName |
getSingle() |
protected CheckedAutoCloseable |
getSingleDependency() |
List<ObjectName> |
getTestingDeps() |
protected List<CheckedAutoCloseable> |
getTestingDepsDependency() |
int |
hashCode() |
boolean |
isSame(AbstractMultipleDependenciesModule 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 |
setSimple(Boolean simple) |
void |
setSingle(ObjectName single) |
void |
setTestingDeps(List<ObjectName> testingDeps) |
void |
validate()
This method will be called as first phase in two phase commit.
|
canReuse, createInstance, getIdentifier, getInstance, setCanReuseInstance
public static final JmxAttribute singleJmxAttribute
public static final JmxAttribute simpleJmxAttribute
public static final JmxAttribute testingDepsJmxAttribute
public AbstractMultipleDependenciesModule(ModuleIdentifier identifier, DependencyResolver dependencyResolver)
public AbstractMultipleDependenciesModule(ModuleIdentifier identifier, DependencyResolver dependencyResolver, AbstractMultipleDependenciesModule 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 CheckedAutoCloseable getSingleDependency()
protected final List<CheckedAutoCloseable> getTestingDepsDependency()
protected final void resolveDependencies()
AbstractModule
resolveDependencies
in class AbstractModule<AbstractMultipleDependenciesModule>
public boolean canReuseInstance(AbstractMultipleDependenciesModule oldModule)
AbstractModule
canReuseInstance
in class AbstractModule<AbstractMultipleDependenciesModule>
oldModule
- old instance of a Modulepublic AutoCloseable reuseInstance(AutoCloseable oldInstance)
AbstractModule
reuseInstance
in class AbstractModule<AbstractMultipleDependenciesModule>
oldInstance
- old instance of a class wrapped by the modulepublic boolean isSame(AbstractMultipleDependenciesModule other)
public ObjectName getSingle()
getSingle
in interface MultipleDependenciesModuleMXBean
public void setSingle(ObjectName single)
setSingle
in interface MultipleDependenciesModuleMXBean
public Boolean getSimple()
getSimple
in interface MultipleDependenciesModuleMXBean
public void setSimple(Boolean simple)
setSimple
in interface MultipleDependenciesModuleMXBean
public List<ObjectName> getTestingDeps()
getTestingDeps
in interface MultipleDependenciesModuleMXBean
public void setTestingDeps(List<ObjectName> testingDeps)
setTestingDeps
in interface MultipleDependenciesModuleMXBean
public org.slf4j.Logger getLogger()
Copyright © 2019 OpenDaylight. All rights reserved.