public class ManagedReloadingStrategy extends java.lang.Object implements ReloadingStrategy, ManagedReloadingStrategyMBean
Modifier and Type | Field and Description |
---|---|
private FileConfiguration |
configuration
Stores a reference to the associated configuration.
|
private org.apache.commons.logging.Log |
log
The logger.
|
private boolean |
reloadingRequired
A flag whether a reload is required.
|
Constructor and Description |
---|
ManagedReloadingStrategy() |
Modifier and Type | Method and Description |
---|---|
void |
init()
Initialize the strategy.
|
void |
refresh()
Tells this strategy that the monitored configuration file should be
refreshed.
|
void |
reloadingPerformed()
Notify the strategy that the file has been reloaded.
|
boolean |
reloadingRequired()
Checks whether reloading is required.
|
void |
setConfiguration(FileConfiguration configuration)
Sets the associated configuration.
|
private org.apache.commons.logging.Log log
private FileConfiguration configuration
private boolean reloadingRequired
public void init()
ReloadingStrategy
init
in interface ReloadingStrategy
ReloadingStrategy.init()
public void reloadingPerformed()
ReloadingStrategy
reloadingPerformed
in interface ReloadingStrategy
ReloadingStrategy.reloadingPerformed()
public boolean reloadingRequired()
refresh()
method has been invokded.reloadingRequired
in interface ReloadingStrategy
ReloadingStrategy.reloadingRequired()
public void setConfiguration(FileConfiguration configuration)
setConfiguration
in interface ReloadingStrategy
configuration
- the associated configurationpublic void refresh()
refresh
in interface ManagedReloadingStrategyMBean
ManagedReloadingStrategyMBean.refresh()