|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.realtime.WaitFreeWriteQueue
A queue that provides unsynchronized nonblocking write() and synchronized blocking read().
Constructor Summary | |
WaitFreeWriteQueue(Thread writer,
Thread reader,
int maximum,
MemoryArea memory)
Constructs a new WaitFreeWriteQueue . |
Method Summary | |
void |
clear()
Empties the queue. |
boolean |
force(Object object)
Replace the last object with this object. |
boolean |
isEmpty()
Checks if the queue is empty. |
boolean |
isFull()
Checks if the queue is full. |
Object |
read()
A synchronized and blocking read operation. |
int |
size()
Returns the number of elements in the queue. |
boolean |
write(Object object)
An unsynchronized and nonblocking write operation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WaitFreeWriteQueue(Thread writer, Thread reader, int maximum, MemoryArea memory) throws IllegalArgumentException, InstantiationException, ClassNotFoundException, IllegalAccessException
WaitFreeWriteQueue
.
writer
- the writing threadreader
- the reading threadmaximum
- the capacity of the queuememory
- the MemoryArea
in which to allocate the
queue's buffer; if null, then the current memory area is
usedMethod Detail |
public void clear()
public boolean isEmpty()
public boolean isFull()
public Object read()
public int size()
public boolean force(Object object) throws MemoryScopeException
object
- the object to write to the queue
MemoryScopeException
- if the object is in an
incompatible memory areapublic boolean write(Object object) throws MemoryScopeException
object
- the object to write to the queue
MemoryScopeException
- if the object is in an
incompatible memory area
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |