Class Pool
- java.lang.Object
-
- com.thoughtworks.xstream.core.util.Pool
-
public class Pool extends java.lang.Object
A simple pool implementation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
Pool.Factory
-
Field Summary
Fields Modifier and Type Field Description private Pool.Factory
factory
private int
initialPoolSize
private int
maxPoolSize
private java.lang.Object
mutex
private int
nextAvailable
private java.lang.Object[]
pool
-
Constructor Summary
Constructors Constructor Description Pool(int initialPoolSize, int maxPoolSize, Pool.Factory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
fetchFromPool()
protected void
putInPool(java.lang.Object object)
private java.lang.Object
readResolve()
-
-
-
Field Detail
-
initialPoolSize
private final int initialPoolSize
-
maxPoolSize
private final int maxPoolSize
-
factory
private final Pool.Factory factory
-
pool
private transient java.lang.Object[] pool
-
nextAvailable
private transient int nextAvailable
-
mutex
private transient java.lang.Object mutex
-
-
Constructor Detail
-
Pool
public Pool(int initialPoolSize, int maxPoolSize, Pool.Factory factory)
-
-