|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.openharbor.beck.map.SharedMapFromXML
A source of mappers that simply allocates the same mapper to all callers.
This strategy is fast and cheap but not thread-safe.
DefaultMapperPool is a thread-safe alternative.
| Constructor Summary | |
SharedMapFromXML(MapFromXML shared)
|
|
| 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 released)
Make a mapper available for re-use. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SharedMapFromXML(MapFromXML shared)
| Method Detail |
public MapFromXML allocateMapFromXML()
MapFromXML.SourceMapFromXML.Source.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).
allocateMapFromXML in interface MapFromXML.Sourcepublic void releaseMapFromXML(MapFromXML released)
MapFromXML.SourceMapFromXML.Source.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.
releaseMapFromXML in interface MapFromXML.Sourcepublic void pollSoon()
MapFromXML.SourceMapFromXML.Source.allocateMapFromXML() is called,
regardless of the currently acceptable staleness.
pollSoon in interface MapFromXML.Source
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||