com.openharbor.beck.map
Class PollableConfiguration

java.lang.Object
  extended bycom.openharbor.beck.map.PollableConfiguration
All Implemented Interfaces:
ConfigurationSource

public class PollableConfiguration
extends java.lang.Object
implements ConfigurationSource

Maps the Configuration from a PollableInput, and tracks changes to that input. This class is not thread-safe.


Constructor Summary
PollableConfiguration(PollableInput input)
           
 
Method Summary
 Configuration getConfiguration()
          The current configuration.
 void pollSoon()
          Check for a change in the configuration next time getConfiguration() is called, regardless of the currently acceptable staleness.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PollableConfiguration

public PollableConfiguration(PollableInput input)
Method Detail

getConfiguration

public Configuration getConfiguration()
                               throws java.lang.Exception
Description copied from interface: ConfigurationSource
The current configuration. For best performance, this method should return the same Configuration repeatedly, switching to a new Configuration only when necessary (e.g. when the old configuration is intolerably stale). Callers of this method do less work when this method returns the same object repeatedly.

Specified by:
getConfiguration in interface ConfigurationSource
Throws:
java.lang.Exception

pollSoon

public void pollSoon()
Description copied from interface: ConfigurationSource
Check for a change in the configuration next time ConfigurationSource.getConfiguration() is called, regardless of the currently acceptable staleness.

Specified by:
pollSoon in interface ConfigurationSource