org.springframework.integration.scheduling
Class PollingSchedule
java.lang.Object
org.springframework.integration.scheduling.PollingSchedule
- All Implemented Interfaces:
- Schedule
public class PollingSchedule
- extends java.lang.Object
- implements Schedule
Scheduling metadata for a task that repeats at a regular interval.
- Author:
- Mark Fisher
Constructor Summary |
PollingSchedule(long period)
Create a fixed-delay schedule with no initial delay. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
DEFAULT_INITIAL_DELAY
public static final long DEFAULT_INITIAL_DELAY
- See Also:
- Constant Field Values
DEFAULT_FIXED_RATE
public static final boolean DEFAULT_FIXED_RATE
- See Also:
- Constant Field Values
period
private volatile long period
initialDelay
private volatile long initialDelay
timeUnit
private volatile java.util.concurrent.TimeUnit timeUnit
fixedRate
private volatile boolean fixedRate
PollingSchedule
public PollingSchedule(long period)
- Create a fixed-delay schedule with no initial delay.
- Parameters:
period
- the polling period in milliseconds
getPeriod
public long getPeriod()
setPeriod
public void setPeriod(long period)
- Set the polling period. A period of 0 indicates a repeating task.
getInitialDelay
public long getInitialDelay()
setInitialDelay
public void setInitialDelay(long initialDelay)
getTimeUnit
public java.util.concurrent.TimeUnit getTimeUnit()
setTimeUnit
public void setTimeUnit(java.util.concurrent.TimeUnit timeUnit)
getFixedRate
public boolean getFixedRate()
setFixedRate
public void setFixedRate(boolean fixedRate)
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object