T - the type of the itempublic class ConcurrentCachedGenerator<T>
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Class and Description |
|---|---|
static interface |
ConcurrentCachedGenerator.Generator<T>
Defines a generic generator of type
T. |
| Constructor and Description |
|---|
ConcurrentCachedGenerator(ConcurrentCachedGenerator.Generator<T> generator,
int cacheSize)
Creates a new instance which wraps the given item generator and uses a
cache of the specified size.
|
| Modifier and Type | Method and Description |
|---|---|
T |
next()
Returns the next value in the generated sequence.
|
void |
readObject(java.io.ObjectInputStream ois) |
public ConcurrentCachedGenerator(ConcurrentCachedGenerator.Generator<T> generator, int cacheSize)
generator - the underlying generatorcacheSize - the size of the cachepublic T next()
public void readObject(java.io.ObjectInputStream ois)
throws java.io.IOException,
java.lang.ClassNotFoundException
java.io.IOExceptionjava.lang.ClassNotFoundException