com.openharbor.beck.map
Interface MapToXML.Source

All Known Implementing Classes:
DefaultMapperPool, SharedMapToXML
Enclosing interface:
MapToXML

public static interface MapToXML.Source

A source of MapToXML objects.


Method Summary
 MapToXML allocateMapToXML()
          Obtain a current mapper.
 void pollSoon()
          Check for a change in the configuration next time allocateMapToXML() is called, regardless of the currently acceptable staleness.
 void releaseMapToXML(MapToXML toRelease)
          Make a mapper available for use by other threads.
 

Method Detail

allocateMapToXML

public MapToXML allocateMapToXML()
                          throws java.lang.Exception
Obtain a current mapper. For best performance, the caller should pass the allocated mapper to releaseMapToXML(com.openharbor.beck.map.MapToXML) 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

releaseMapToXML

public void releaseMapToXML(MapToXML toRelease)
                     throws java.lang.Exception
Make a mapper available for use by other threads. The caller must not use this mapper subsequently (unless the same mapper is returned from another call to allocateMapToXML()). This source may allocate the mapper to another thread, which might result in erroneous concurrent use of the mapper by both threads.

Throws:
java.lang.Exception

pollSoon

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