public class CircularBuffer
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.Object[] |
buf |
protected boolean |
closePut |
protected int |
count |
protected int |
in |
protected boolean |
interruptGet |
protected boolean |
interruptPut |
protected int |
out |
protected int |
size |
Constructor and Description |
---|
CircularBuffer(int size) |
Modifier and Type | Method and Description |
---|---|
void |
closePut() |
java.lang.Object |
get() |
void |
interruptBoth() |
void |
interruptGet() |
void |
interruptPut() |
boolean |
isEmpty() |
boolean |
isGetInterrupted() |
boolean |
isPutClosed() |
boolean |
isPutInterrupted() |
boolean |
put(java.lang.Object o) |
protected java.lang.Object[] buf
protected int in
protected int out
protected int count
protected int size
protected boolean interruptPut
protected boolean interruptGet
protected boolean closePut
public boolean isEmpty()
public boolean put(java.lang.Object o) throws java.lang.InterruptedException
java.lang.InterruptedException
public java.lang.Object get() throws java.lang.InterruptedException
java.lang.InterruptedException
public void closePut()
public boolean isPutClosed()
public void interruptBoth()
public void interruptGet()
public void interruptPut()
public boolean isGetInterrupted()
public boolean isPutInterrupted()