Package org.vibur.objectpool.util
package org.vibur.objectpool.util
-
ClassDescriptionAn adapter interface to a concurrent collection that provides 4 access methods:
ConcurrentCollection.offerFirst(T),ConcurrentCollection.offerLast(T),ConcurrentCollection.pollFirst(), andConcurrentCollection.pollLast().AConcurrentLinkedDequebased implementation ofConcurrentCollection.AConcurrentLinkedQueuebased implementation ofConcurrentCollection.AConcurrentStackbased implementation ofConcurrentCollection.Listener<T>An instance of this interface can be supplied to the pool at its creation time, and its methods will be called upon calling the pooltakeandrestoreoperations.AMultithreadConcurrentQueuebased implementation ofConcurrentCollection.A sampling pool reducer util, which is awakened up a given number of times during a predefined period of time, and checks whether the number of available allocated objects in the object pool needs to be reduced.An instance of this class can be supplied to the pool at its creation time, and its methods will be called upon calling the pool take and restore operations.The pool reducers implementing this interface will create one daemon service thread which will be started when the reducer'sstart()method is called, and will be alive until theterminate()method is called or until the calling application exits.