class I2CPMessageQueueImpl extends I2CPMessageQueue
Constructor and Description |
---|
I2CPMessageQueueImpl(BlockingQueue<I2CPMessage> in,
BlockingQueue<I2CPMessage> out) |
Modifier and Type | Method and Description |
---|---|
boolean |
offer(I2CPMessage msg)
Send a message, nonblocking
|
boolean |
offer(I2CPMessage msg,
long timeout)
Send a message, blocking.
|
I2CPMessage |
poll()
Receive a message, nonblocking
|
void |
put(I2CPMessage msg)
Send a message, blocking until space is available
|
I2CPMessage |
take()
Receive a message, blocking until one is available
|
close
public I2CPMessageQueueImpl(BlockingQueue<I2CPMessage> in, BlockingQueue<I2CPMessage> out)
public boolean offer(I2CPMessage msg)
offer
in class I2CPMessageQueue
public boolean offer(I2CPMessage msg, long timeout) throws InterruptedException
offer
in class I2CPMessageQueue
timeout
- how long to wait for space (ms)InterruptedException
public I2CPMessage poll()
poll
in class I2CPMessageQueue
public void put(I2CPMessage msg) throws InterruptedException
put
in class I2CPMessageQueue
InterruptedException
public I2CPMessage take() throws InterruptedException
take
in class I2CPMessageQueue
InterruptedException