public class TimedInactivityRestartStrategy extends java.lang.Object implements RestartStrategy
This RestartStrategy monitors the last usage of the service and if the last usage passes an inactivity period, then this strategy will return true upon requiresRestart().
In the adapter configuration file this class is aliased as timed-inactivity-restart-strategy which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
TimedInactivityRestartStrategy() |
Modifier and Type | Method and Description |
---|---|
TimeInterval |
getInactivityPeriod() |
protected long |
inactivityPeriodMs() |
void |
messageProcessed(AdaptrisMessage msg)
Mark the current message as processed.
|
boolean |
requiresRestart()
Whether or not a restart of the underlying service is required.
|
void |
setInactivityPeriod(TimeInterval inactivityPeriod) |
public void messageProcessed(AdaptrisMessage msg)
RestartStrategy
messageProcessed
in interface RestartStrategy
msg
- the message currently being processed.public boolean requiresRestart()
RestartStrategy
requiresRestart
in interface RestartStrategy
public TimeInterval getInactivityPeriod()
public void setInactivityPeriod(TimeInterval inactivityPeriod)
protected long inactivityPeriodMs()