Class ViewPoolEntryHolder
java.lang.Object
org.apache.myfaces.view.facelets.pool.impl.ViewPoolEntryHolder
Fast pool using ConcurrentLinkedQueue, with uses an AtomicInteger as
count limit. The reasons of design this pool in this way are:
- There is no need to put a hard limit about the max number of views stored in the pool. Remember ViewEntry internally has a Soft or Weak reference over the view. The maxCount is just a way to limit the max footprint fo the pool in memory, but if the limit is exceed, the vm can always reclaim the memory space.
- View creation is quite fast, so according to previous tests done, include any syncronized method in this code will produce worse performance.
- Author:
- Leonardo Uribe
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ViewPoolEntryHolder
public ViewPoolEntryHolder(int maxCount)
-
-
Method Details
-
add
-
poll
-
isFull
public boolean isFull() -
getCount
public int getCount()
-