|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object communication.SynchronizedBuffer<T>
public class SynchronizedBuffer<T>
Utility class for implementation of services: synchronized buffer of elements of any type T
Constructor Summary | |
---|---|
SynchronizedBuffer()
|
Method Summary | |
---|---|
void |
addElement(T elt)
Add an element in the buffer |
int |
available()
|
T |
removeElement(boolean synchronicity)
Get and remove the next available element in the buffer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SynchronizedBuffer()
Method Detail |
---|
public T removeElement(boolean synchronicity)
synchronicity
- if true, wait for an element to be available in the buffer, if not,
return immediatly (and return null
if the buffer was empty)
null
valuepublic int available()
public void addElement(T elt)
elt
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |