org.springframework.integration.scheduling
Class PollingSchedule

java.lang.Object
  extended by 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

Field Summary
static boolean DEFAULT_FIXED_RATE
           
static long DEFAULT_INITIAL_DELAY
           
private  boolean fixedRate
           
private  long initialDelay
           
private  long period
           
private  java.util.concurrent.TimeUnit timeUnit
           
 
Constructor Summary
PollingSchedule(long period)
          Create a fixed-delay schedule with no initial delay.
 
Method Summary
 boolean equals(java.lang.Object other)
           
 boolean getFixedRate()
           
 long getInitialDelay()
           
 long getPeriod()
           
 java.util.concurrent.TimeUnit getTimeUnit()
           
 int hashCode()
           
 void setFixedRate(boolean fixedRate)
           
 void setInitialDelay(long initialDelay)
           
 void setPeriod(long period)
          Set the polling period.
 void setTimeUnit(java.util.concurrent.TimeUnit timeUnit)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

PollingSchedule

public PollingSchedule(long period)
Create a fixed-delay schedule with no initial delay.

Parameters:
period - the polling period in milliseconds
Method Detail

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