Package org.globus.util
Class CircularBuffer
- java.lang.Object
-
- org.globus.util.CircularBuffer
-
public class CircularBuffer extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Object[]bufprotected booleanclosePutprotected intcountprotected intinprotected booleaninterruptGetprotected booleaninterruptPutprotected intoutprotected intsize
-
Constructor Summary
Constructors Constructor Description CircularBuffer(int size)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclosePut()java.lang.Objectget()voidinterruptBoth()voidinterruptGet()voidinterruptPut()booleanisEmpty()booleanisGetInterrupted()booleanisPutClosed()booleanisPutInterrupted()booleanput(java.lang.Object o)
-
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
-
put
public boolean put(java.lang.Object o) throws java.lang.InterruptedException- Throws:
java.lang.InterruptedException
-
get
public java.lang.Object get() throws java.lang.InterruptedException- Throws:
java.lang.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()
-
-