edu.sc.seis.fissuresUtil.cache
Class AbstractQueue

java.lang.Object
  extended by edu.sc.seis.fissuresUtil.cache.AbstractQueue

public abstract class AbstractQueue
extends java.lang.Object


Constructor Summary
AbstractQueue()
           
 
Method Summary
 int getLength()
          returns the length of the queue.
 boolean getSourceAlive()
          returns true if the source i.e., the thread which pushes objects into the queue is alive, else returns false.
 java.lang.Object pop()
          pops the first element of the queue.
 void push(java.lang.Object obj)
          inserts the obj at the end of the queue.
 void setSourceAlive(boolean value)
          sets if the source i.e., the thread which pushes objects into the queue is alive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractQueue

public AbstractQueue()
Method Detail

pop

public java.lang.Object pop()
pops the first element of the queue.

Returns:
a java.lang.Object value

push

public void push(java.lang.Object obj)
inserts the obj at the end of the queue.

Parameters:
obj - a java.lang.Object value to be inserted into the queue.

getLength

public int getLength()
returns the length of the queue.

Returns:
an int value

setSourceAlive

public void setSourceAlive(boolean value)
sets if the source i.e., the thread which pushes objects into the queue is alive

Parameters:
value - a boolean value

getSourceAlive

public boolean getSourceAlive()
returns true if the source i.e., the thread which pushes objects into the queue is alive, else returns false.

Returns:
a boolean value