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, non-blocking
|
void |
put(I2CPMessage msg)
Send a message, blocking until space is available
|
I2CPMessage |
take()
Receive a message, blocking until one is available
|
closepublic I2CPMessageQueueImpl(BlockingQueue<I2CPMessage> in, BlockingQueue<I2CPMessage> out)
public boolean offer(I2CPMessage msg)
offer in class I2CPMessageQueuepublic boolean offer(I2CPMessage msg, long timeout) throws InterruptedException
offer in class I2CPMessageQueuetimeout - how long to wait for space (ms)InterruptedExceptionpublic I2CPMessage poll()
poll in class I2CPMessageQueuepublic void put(I2CPMessage msg) throws InterruptedException
put in class I2CPMessageQueueInterruptedExceptionpublic I2CPMessage take() throws InterruptedException
take in class I2CPMessageQueueInterruptedException