com.netflix.config
Class FixedDelayPollingScheduler

java.lang.Object
  extended by com.netflix.config.AbstractPollingScheduler
      extended by com.netflix.config.FixedDelayPollingScheduler

public class FixedDelayPollingScheduler
extends AbstractPollingScheduler


Field Summary
static java.lang.String DELAY_PROPERTY
          System property name to define the delay in milliseconds.
static java.lang.String INITIAL_DELAY_PROPERTY
          System property name to define the initial delay in milliseconds.
 
Constructor Summary
FixedDelayPollingScheduler()
          Create an instance with initial delay and delay defined in system properties "archaius.fixedDelayPollingScheduler.initialDelayMills" and "archaius.fixedDelayPollingScheduler.delayMills" The scheduler will delete the property in a configuration if it is absent from the configuration source.
FixedDelayPollingScheduler(int initialDelayMillis, int delayMillis, boolean ignoreDeletesFromSource)
           
 
Method Summary
protected  void schedule(java.lang.Runnable runnable)
          This method is implemented with ScheduledExecutorService.scheduleWithFixedDelay(Runnable, long, long, TimeUnit)
 void stop()
          Stop the scheduler
 
Methods inherited from class com.netflix.config.AbstractPollingScheduler
addPollListener, getNextCheckPoint, getPollingRunnable, initialLoad, isIgnoreDeletesFromSource, populateProperties, removePollListener, setIgnoreDeletesFromSource, startPolling
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INITIAL_DELAY_PROPERTY

public static final java.lang.String INITIAL_DELAY_PROPERTY
System property name to define the initial delay in milliseconds.

See Also:
Constant Field Values

DELAY_PROPERTY

public static final java.lang.String DELAY_PROPERTY
System property name to define the delay in milliseconds.

See Also:
Constant Field Values
Constructor Detail

FixedDelayPollingScheduler

public FixedDelayPollingScheduler()
Create an instance with initial delay and delay defined in system properties "archaius.fixedDelayPollingScheduler.initialDelayMills" and "archaius.fixedDelayPollingScheduler.delayMills" The scheduler will delete the property in a configuration if it is absent from the configuration source.


FixedDelayPollingScheduler

public FixedDelayPollingScheduler(int initialDelayMillis,
                                  int delayMillis,
                                  boolean ignoreDeletesFromSource)
Parameters:
initialDelayMillis - initial delay in milliseconds
delayMillis - delay in milliseconds
ignoreDeletesFromSource - whether the scheduler should ignore deletes of properties from configuration source when applying the polling result to a configuration.
Method Detail

schedule

protected void schedule(java.lang.Runnable runnable)
This method is implemented with ScheduledExecutorService.scheduleWithFixedDelay(Runnable, long, long, TimeUnit)

Specified by:
schedule in class AbstractPollingScheduler
Parameters:
runnable - The runnable to be scheduled.

stop

public void stop()
Description copied from class: AbstractPollingScheduler
Stop the scheduler

Specified by:
stop in class AbstractPollingScheduler