public interface Queue
Modifier and Type | Method and Description |
---|---|
void |
close(Duration timeout)
Closes the queue synchronously.
|
void |
closeAsync(Duration timeout)
Closes the queue asynchronously.
|
void |
configure(QueueOptions options,
Duration timeout)
Configures the queue synchronously.
|
void |
configureAsync(QueueOptions options,
Duration timeout)
Opens the queue asynchronously.
|
PutMessage |
createPutMessage(ByteBuffer... payload)
Creates a PUT message object bounded to this queue with the specified payload
|
void |
flush()
Sends previously packed PUT messages in one multi message PUT event.
|
boolean |
isOpen()
Checks if the queue is opened.
|
void |
open(QueueOptions options,
Duration timeout)
Opens the queue synchronously.
|
void |
openAsync(QueueOptions options,
Duration timeout)
Opens the queue asynchronously.
|
void |
pack(PutMessage message)
Adds a single PUT message to be sent withing multi message PUT event.
|
void |
post(PutMessage message)
Sends a single PUT message to this queue.
|
Uri |
uri()
Gets queue URI.
|
void open(QueueOptions options, Duration timeout)
This operation will block until either success, failure, or timing out happens.
options
- the options to configure some advanced settings.timeout
- the operation timeout.BMQException
- in case of failure.QueueOptions
void openAsync(QueueOptions options, Duration timeout)
This operation will post open queue request and return immediately. Success, failure, or
timing out will be reported through QueueEventHandler
options
- the options to configure some advanced settingstimeout
- the operation timeoutBMQException
- in case of failureQueueOptions
void configure(QueueOptions options, Duration timeout)
Fields from 'options' that have not been explicitly set will not be modified.
This operation will block until either success, failure, or timing out happens.
options
- options to configure some advanced settingstimeout
- operation timeoutBMQException
- in case of failureQueueOptions
void configureAsync(QueueOptions options, Duration timeout)
Fields from 'options' that have not been explicitly set will not be modified.
This operation will post configure queue request and return immediately. Success, failure,
or timing out will be reported through QueueEventHandler
options
- options to configure some advanced settingstimeout
- operation timeoutBMQException
- in case of failureQueueOptions
void close(Duration timeout)
This operation will block until either success, failure, or timing out happens.
timeout
- operation timeoutBMQException
- in case of failurevoid closeAsync(Duration timeout)
This operation will post close queue request and return immediately. Success, failure, or
timing out will be reported through QueueEventHandler
timeout
- operation timeoutBMQException
- in case of failurePutMessage createPutMessage(ByteBuffer... payload)
payload
- this message payloadPutMessage
that can be sent via this queueBMQException
- in case of failure while setting the payloadRuntimeException
- in case of other failuresvoid post(PutMessage message)
message
- PUT message to be sentBMQException
- in case of failurevoid pack(PutMessage message)
message
- PUT message to addBMQException
- in case of failurevoid flush()
BMQException
- in case of failureboolean isOpen()
Copyright © 2023 Bloomberg L.P.. All rights reserved.