org.eviline.randomizer
Class QueuedRandomizer
java.lang.Object
org.eviline.randomizer.AbstractRandomizer
org.eviline.randomizer.QueuedRandomizer
- All Implemented Interfaces:
- Randomizer
public class QueuedRandomizer
- extends AbstractRandomizer
- implements Randomizer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
provider
protected Randomizer provider
concurrent
protected boolean concurrent
size
protected int size
queue
protected BlockingQueue<ShapeType> queue
executor
protected ExecutorService executor
signal
protected Semaphore signal
future
protected Future<?> future
latest
protected Field latest
taunt
protected volatile String taunt
QueuedRandomizer
public QueuedRandomizer(Randomizer p,
int size,
boolean concurrent)
provideShape
public Shape provideShape(Field field)
- Description copied from interface:
Randomizer
- Return the
Shape
to be next played on the argument Field
- Specified by:
provideShape
in interface Randomizer
- Returns:
sequentialProvideShape
public Shape sequentialProvideShape(Field f)
concurrentProvideShape
public Shape concurrentProvideShape(Field f)
getTaunt
public String getTaunt()
- Specified by:
getTaunt
in interface Randomizer
writeReplace
public Object writeReplace()
throws ObjectStreamException
- Throws:
ObjectStreamException
config
public PropertySource config()
- Specified by:
config
in interface Randomizer
name
public String name()
- Specified by:
name
in interface Randomizer
Copyright © 2013. All Rights Reserved.