Class SyncSimpleQueue
Class SyncSimpleQueue
java.lang.Object
|
+----SyncSimpleQueue
- class SyncSimpleQueue
- extends Object
A class reprezenting a simple static allocated synchronized queue
of objects.
Written: Radu Sion
Version: 0.1
Source: SyncSimpleQueue.java
-
SyncSimpleQueue(int)
-
-
Insert(Object)
- Inserts a new object into the queue ( no testings are done on the object )
-
Size()
- Returns the current size (entries) of the queue
-
fetchNext()
- Fetches the next object out of queue
-
getMaxSize()
- Gets the maximum size (entries) in the queue
-
isEmpty()
- Tests if the queue is empty
-
isFull()
- Tests if the queue is full
SyncSimpleQueue
public SyncSimpleQueue(int entr)
- Parameters:
- entr - The maximum entries in the queue
getMaxSize
public synchronized int getMaxSize()
- Gets the maximum size (entries) in the queue
isEmpty
public synchronized boolean isEmpty()
- Tests if the queue is empty
isFull
public synchronized boolean isFull()
- Tests if the queue is full
Size
public synchronized int Size()
- Returns the current size (entries) of the queue
fetchNext
public synchronized Object fetchNext() throws EmptyException
- Fetches the next object out of queue
- Returns:
- The next object fetched out of the queue
- Throws: EmptyException
- When the queue is empty
Insert
public synchronized void Insert(Object oo) throws FullException
- Inserts a new object into the queue ( no testings are done on the object )
- Parameters:
- oo - The object to insert
- Throws: FullException
- The queue is full