public abstract class AbstractShutdownModule extends AbstractModule<AbstractShutdownModule> implements ShutdownModuleMXBean, ShutdownServiceServiceInterface, RuntimeBeanRegistratorAwareModule
Modifier and Type | Field and Description |
---|---|
static JmxAttribute |
secretJmxAttribute |
dependencyResolver, identifier
Constructor and Description |
---|
AbstractShutdownModule(ModuleIdentifier identifier,
DependencyResolver dependencyResolver) |
AbstractShutdownModule(ModuleIdentifier identifier,
DependencyResolver dependencyResolver,
AbstractShutdownModule oldModule,
AutoCloseable oldInstance) |
Modifier and Type | Method and Description |
---|---|
boolean |
canReuseInstance(AbstractShutdownModule 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() |
ShutdownRuntimeRegistrator |
getRootRuntimeBeanRegistratorWrapper() |
String |
getSecret() |
int |
hashCode() |
boolean |
isSame(AbstractShutdownModule 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 |
setRuntimeBeanRegistrator(RootRuntimeBeanRegistrator rootRuntimeRegistrator)
Configuration framework will call this setter on all modules implementing
this interface.
|
void |
setSecret(String secret) |
void |
validate()
This method will be called as first phase in two phase commit.
|
canReuse, createInstance, getIdentifier, getInstance, setCanReuseInstance
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
canReuse, getInstance
public static final JmxAttribute secretJmxAttribute
public AbstractShutdownModule(ModuleIdentifier identifier, DependencyResolver dependencyResolver)
public AbstractShutdownModule(ModuleIdentifier identifier, DependencyResolver dependencyResolver, AbstractShutdownModule oldModule, AutoCloseable oldInstance)
public ShutdownRuntimeRegistrator getRootRuntimeBeanRegistratorWrapper()
public void setRuntimeBeanRegistrator(RootRuntimeBeanRegistrator rootRuntimeRegistrator)
RuntimeBeanRegistratorAwareModule
Closeable.close()
method. Same
module will get the same registrator during reconfiguration.setRuntimeBeanRegistrator
in interface RuntimeBeanRegistratorAwareModule
rootRuntimeRegistrator
- root beanpublic void validate()
Module
Module.getInstance()
on
dependent Module
because it would destroy separation between
validation and commit phase.protected void customValidation()
protected final void resolveDependencies()
AbstractModule
resolveDependencies
in class AbstractModule<AbstractShutdownModule>
public boolean canReuseInstance(AbstractShutdownModule oldModule)
AbstractModule
canReuseInstance
in class AbstractModule<AbstractShutdownModule>
oldModule
- old instance of a Modulepublic AutoCloseable reuseInstance(AutoCloseable oldInstance)
AbstractModule
reuseInstance
in class AbstractModule<AbstractShutdownModule>
oldInstance
- old instance of a class wrapped by the modulepublic boolean isSame(AbstractShutdownModule other)
public String getSecret()
getSecret
in interface ShutdownModuleMXBean
public void setSecret(String secret)
setSecret
in interface ShutdownModuleMXBean
public org.slf4j.Logger getLogger()
Copyright © 2019 OpenDaylight. All rights reserved.