com.openharbor.beck.map
Interface MapFromXML.Source

All Known Implementing Classes:
DefaultMapperPool, SharedMapFromXML
Enclosing interface:
MapFromXML

public static interface MapFromXML.Source

A source of MapFromXML objects.


Method Summary
 MapFromXML allocateMapFromXML()
          Obtain a current mapper.
 void pollSoon()
          Check for a change in the configuration next time allocateMapFromXML() is called, regardless of the currently acceptable staleness.
 void releaseMapFromXML(MapFromXML toRelease)
          Make a mapper available for re-use.
 

Method Detail

allocateMapFromXML

public MapFromXML allocateMapFromXML()
                              throws java.lang.Exception
Obtain a current mapper. For best performance, the caller should pass the allocated mapper to releaseMapFromXML(com.openharbor.beck.map.MapFromXML) after the caller has done using it. For best performance, this method should return the same object repeatedly, switching to a new object only when necessary (e.g. when the old object is intolerably stale).

Throws:
java.lang.Exception

releaseMapFromXML

public void releaseMapFromXML(MapFromXML toRelease)
                       throws java.lang.Exception
Make a mapper available for re-use. The caller must not use this mapper subsequently (unless the same mapper is returned from another call to allocateMapFromXML()). This Source may allocate the mapper to another thread, which might result in erroneous concurrent use of the mapper by both threads if a previous releaser cheats.

Throws:
java.lang.Exception

pollSoon

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