public abstract class I2CPMessageQueue extends Object
Constructor and Description |
---|
I2CPMessageQueue() |
Modifier and Type | Method and Description |
---|---|
void |
close()
== offer(new PoisonI2CPMessage());
|
abstract boolean |
offer(I2CPMessage msg)
Send a message, nonblocking.
|
abstract boolean |
offer(I2CPMessage msg,
long timeout)
Send a message, blocking.
|
abstract I2CPMessage |
poll()
Receive a message, nonblocking.
|
abstract void |
put(I2CPMessage msg)
Send a message, blocking until space is available.
|
abstract I2CPMessage |
take()
Receive a message, blocking until one is available.
|
public abstract boolean offer(I2CPMessage msg)
public abstract boolean offer(I2CPMessage msg, long timeout) throws InterruptedException
timeout
- how long to wait for space (ms)InterruptedException
public abstract I2CPMessage poll()
public abstract void put(I2CPMessage msg) throws InterruptedException
InterruptedException
public abstract I2CPMessage take() throws InterruptedException
InterruptedException
public void close()