public abstract class AbstractHashedWheelTimerModule extends AbstractModule<AbstractHashedWheelTimerModule> implements HashedWheelTimerModuleMXBean, TimerServiceInterface
Modifier and Type | Field and Description |
---|---|
static JmxAttribute |
tickDurationJmxAttribute |
static JmxAttribute |
ticksPerWheelJmxAttribute |
dependencyResolver, identifier
Constructor and Description |
---|
AbstractHashedWheelTimerModule(ModuleIdentifier identifier,
DependencyResolver dependencyResolver) |
AbstractHashedWheelTimerModule(ModuleIdentifier identifier,
DependencyResolver dependencyResolver,
AbstractHashedWheelTimerModule oldModule,
AutoCloseable oldInstance) |
Modifier and Type | Method and Description |
---|---|
boolean |
canReuseInstance(AbstractHashedWheelTimerModule 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() |
Long |
getTickDuration() |
Integer |
getTicksPerWheel() |
int |
hashCode() |
boolean |
isSame(AbstractHashedWheelTimerModule 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 |
setTickDuration(Long tickDuration) |
void |
setTicksPerWheel(Integer ticksPerWheel) |
void |
validate()
This method will be called as first phase in two phase commit.
|
canReuse, createInstance, getIdentifier, getInstance, setCanReuseInstance
public static final JmxAttribute tickDurationJmxAttribute
public static final JmxAttribute ticksPerWheelJmxAttribute
public AbstractHashedWheelTimerModule(ModuleIdentifier identifier, DependencyResolver dependencyResolver)
public AbstractHashedWheelTimerModule(ModuleIdentifier identifier, DependencyResolver dependencyResolver, AbstractHashedWheelTimerModule 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 void resolveDependencies()
AbstractModule
resolveDependencies
in class AbstractModule<AbstractHashedWheelTimerModule>
public boolean canReuseInstance(AbstractHashedWheelTimerModule oldModule)
AbstractModule
canReuseInstance
in class AbstractModule<AbstractHashedWheelTimerModule>
oldModule
- old instance of a Modulepublic AutoCloseable reuseInstance(AutoCloseable oldInstance)
AbstractModule
reuseInstance
in class AbstractModule<AbstractHashedWheelTimerModule>
oldInstance
- old instance of a class wrapped by the modulepublic boolean isSame(AbstractHashedWheelTimerModule other)
public Long getTickDuration()
getTickDuration
in interface HashedWheelTimerModuleMXBean
public void setTickDuration(Long tickDuration)
setTickDuration
in interface HashedWheelTimerModuleMXBean
public Integer getTicksPerWheel()
getTicksPerWheel
in interface HashedWheelTimerModuleMXBean
public void setTicksPerWheel(Integer ticksPerWheel)
setTicksPerWheel
in interface HashedWheelTimerModuleMXBean
public org.slf4j.Logger getLogger()
Copyright © 2019 OpenDaylight. All rights reserved.