com.openharbor.beck.map
Interface ConfigurationSource

All Known Implementing Classes:
PollableConfiguration, StaticConfiguration

public interface ConfigurationSource

A source of Configuration objects.

Implementations of this interface are not required to be thread-safe. Callers must not execute methods of the same ConfigurationSource instance concurrently in two or more threads. However, separate instances of ConfigurationSource may be used concurrently.


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.
 

Method Detail

getConfiguration

public Configuration getConfiguration()
                               throws java.lang.Exception
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.

Throws:
java.lang.Exception

pollSoon

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