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

Constructor Index

 o SyncSimpleQueue(int)

Method Index

 o Insert(Object)
Inserts a new object into the queue ( no testings are done on the object )
 o Size()
Returns the current size (entries) of the queue
 o fetchNext()
Fetches the next object out of queue
 o getMaxSize()
Gets the maximum size (entries) in the queue
 o isEmpty()
Tests if the queue is empty
 o isFull()
Tests if the queue is full

Constructors

 o SyncSimpleQueue
  public SyncSimpleQueue(int entr)
Parameters:
entr - The maximum entries in the queue

Methods

 o getMaxSize
  public synchronized int getMaxSize()
Gets the maximum size (entries) in the queue
 o isEmpty
  public synchronized boolean isEmpty()
Tests if the queue is empty
 o isFull
  public synchronized boolean isFull()
Tests if the queue is full
 o Size
  public synchronized int Size()
Returns the current size (entries) of the queue
 o 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
 o 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