com.sun.istack
Interface Pool<T>

All Known Implementing Classes:
Pool.Impl

public interface Pool<T>

Pool of reusable objects that are indistinguishable from each other, such as JAXB marshallers.

Author:
Kohsuke Kawaguchi

Nested Class Summary
static class Pool.Impl<T>
          Default implementation that uses ConcurrentLinkedQueue as the data store.
 
Method Summary
 void recycle(T t)
          Returns an object back to the pool.
 T take()
          Gets a new object from the pool.
 

Method Detail

take

@NotNull
T take()
Gets a new object from the pool.

If no object is available in the pool, this method creates a new one.


recycle

void recycle(@NotNull
             T t)
Returns an object back to the pool.