public class IdleTimeoutTrigger
extends java.lang.Object
implements org.springframework.scheduling.Trigger
Trigger
for idle timeout task execution.Constructor and Description |
---|
IdleTimeoutTrigger(long timeout)
Instantiates a new idle timeout trigger.
|
IdleTimeoutTrigger(long timeout,
java.util.concurrent.TimeUnit timeUnit)
Instantiates a new idle timeout trigger.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
java.util.Date |
nextExecutionTime(org.springframework.scheduling.TriggerContext triggerContext) |
void |
reset()
Notify trigger that we should get into new timeout period.
|
void |
setInitialDelay(long initialDelay)
Specify the delay for the initial execution.
|
public IdleTimeoutTrigger(long timeout)
timeout
- the timeoutpublic IdleTimeoutTrigger(long timeout, java.util.concurrent.TimeUnit timeUnit)
timeout
- the timeouttimeUnit
- the time unitpublic java.util.Date nextExecutionTime(org.springframework.scheduling.TriggerContext triggerContext)
nextExecutionTime
in interface org.springframework.scheduling.Trigger
public void setInitialDelay(long initialDelay)
TimeUnit
. If
no time unit was explicitly provided upon instantiation, the default is milliseconds.initialDelay
- initial delaypublic void reset()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object