This implementation of {@link ParserPool} allows its properties to be modified over time and versions the builders it manages appropriately. There are certain performance penalties for doing this. For a more performant implementation that does not support versioning or property modification over time, see {@link StaticBasicParserPool}.
This is a pool implementation of the caching factory variety, and as such imposes no upper bound on the number of DocumentBuilders allowed to be concurrently checked out and in use. It does however impose a limit on the size of the internal cache of idle builder instances via the value configured via {@link #setMaxPoolSize(int)}.
Builders retrieved from this pool may (but are not required to) be returned to the pool with the method {@link #returnBuilder(DocumentBuilder)}. Builders checked out prior to a change in the pool's properties will not be effected by the change and will be appropriately dealt with when they are returned.
References to builders are kept by way of {@link SoftReference} so that the garbage collector may reap the builders if the system is running out of memory.
|
|
|
|
|
|
|
|