public class CircularBuffer extends Object
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
CircularBuffer(int size) |
Modifier and Type | Method and Description |
---|---|
void |
closePut() |
Object |
get() |
void |
interruptBoth() |
void |
interruptGet() |
void |
interruptPut() |
boolean |
isEmpty() |
boolean |
isGetInterrupted() |
boolean |
isPutClosed() |
boolean |
isPutInterrupted() |
boolean |
put(Object o) |
protected 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(Object o) throws InterruptedException
InterruptedException
public Object get() throws InterruptedException
InterruptedException
public void closePut()
public boolean isPutClosed()
public void interruptBoth()
public void interruptGet()
public void interruptPut()
public boolean isGetInterrupted()
public boolean isPutInterrupted()
Copyright © 2016. All rights reserved.