org.globus.util
Class CircularBuffer

java.lang.Object
  extended by org.globus.util.CircularBuffer

public class CircularBuffer
extends Object


Field Summary
protected  Object[] buf
           
protected  boolean closePut
           
protected  int count
           
protected  int in
           
protected  boolean interruptGet
           
protected  boolean interruptPut
           
protected  int out
           
protected  int size
           
 
Constructor Summary
CircularBuffer(int size)
           
 
Method Summary
 void closePut()
           
 Object get()
           
 void interruptBoth()
           
 void interruptGet()
           
 void interruptPut()
           
 boolean isEmpty()
           
 boolean isGetInterrupted()
           
 boolean isPutClosed()
           
 boolean isPutInterrupted()
           
 boolean put(Object o)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buf

protected Object[] buf

in

protected int in

out

protected int out

count

protected int count

size

protected int size

interruptPut

protected boolean interruptPut

interruptGet

protected boolean interruptGet

closePut

protected boolean closePut
Constructor Detail

CircularBuffer

public CircularBuffer(int size)
Method Detail

isEmpty

public boolean isEmpty()

put

public boolean put(Object o)
            throws InterruptedException
Throws:
InterruptedException

get

public Object get()
           throws InterruptedException
Throws:
InterruptedException

closePut

public void closePut()

isPutClosed

public boolean isPutClosed()

interruptBoth

public void interruptBoth()

interruptGet

public void interruptGet()

interruptPut

public void interruptPut()

isGetInterrupted

public boolean isGetInterrupted()

isPutInterrupted

public boolean isPutInterrupted()