|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensubsystems.core.util.SynchronizedQueue
public class SynchronizedQueue
Class that implement unlimited queue, that is synchronized. It means that the consumer of the objects from the queue waits/is blocked in the get method until there is an object available.
| Field Summary | |
|---|---|
protected java.util.List |
m_lstObjects
Cache of object produced by producer and consumed by consumer. |
| Constructor Summary | |
|---|---|
SynchronizedQueue()
Constructor for Synchronized Queue Object. |
|
| Method Summary | |
|---|---|
protected void |
finalize()
Destructor for Synchronized Queue. |
java.lang.Object |
get()
Get the object from the beginning of the queue |
boolean |
isEmpty()
Test if the queue is empty. |
void |
put(java.lang.Object objNew)
Put the object to the end of the queue. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.List m_lstObjects
| Constructor Detail |
|---|
public SynchronizedQueue()
| Method Detail |
|---|
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable - - default destructor exception
public java.lang.Object get()
throws java.lang.InterruptedException
java.lang.InterruptedException - - if the thread is blocked in this
function and you call interrupt method,
an InterruptedException will be thrown.public void put(java.lang.Object objNew)
objNew - - new object, can be nullpublic boolean isEmpty()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||