@Immutable public enum QueueFlags extends Enum<QueueFlags>
AbstractSession.getQueue(com.bloomberg.bmq.Uri, long, com.bloomberg.bmq.QueueEventHandler, com.bloomberg.bmq.AckMessageHandler, com.bloomberg.bmq.PushMessageHandler)
.
Each value of the enum correspond to a bit of a bit-mask integer. It also exposes a set of
utilities to manipulate such bit-mask value.Enum Constant and Description |
---|
ACK
Set to indicate interested in receiving
ACK events for all message posted |
ADMIN
The queue is opened in admin mode (valid only for BlazingMQ admin tasks).
|
EMPTY |
READ
The queue is opened for consuming messages.
|
WRITE
The queue is opened for posting messages.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
isAck(long flags)
Returns
true if the specified flags represent ack required. |
static boolean |
isAdmin(long flags)
Returns
true if the specified flags represent an admin. |
static boolean |
isReader(long flags)
Returns
true if the specified flags represent a reader. |
static boolean |
isWriter(long flags)
Returns
true if the specified flags represent a writer. |
static long |
setAck(long flags)
Sets the specified
flags representation for ack. |
static long |
setAdmin(long flags)
Sets the specified
flags representation for admin. |
static long |
setReader(long flags)
Sets the specified
flags representation for reader. |
static long |
setWriter(long flags)
Sets the specified
flags representation for writer. |
int |
toInt()
Returns integer representation of this enum value.
|
static QueueFlags |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static QueueFlags[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final QueueFlags ADMIN
public static final QueueFlags READ
public static final QueueFlags WRITE
public static final QueueFlags ACK
ACK
events for all message postedpublic static final QueueFlags EMPTY
public static QueueFlags[] values()
for (QueueFlags c : QueueFlags.values()) System.out.println(c);
public static QueueFlags valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int toInt()
public static long setReader(long flags)
flags
representation for reader.flags
- initial flags value to modifypublic static long setAdmin(long flags)
flags
representation for admin.flags
- initial flags value to modifypublic static long setWriter(long flags)
flags
representation for writer.flags
- initial flags value to modifypublic static long setAck(long flags)
flags
representation for ack.flags
- initial flags value to modifypublic static boolean isReader(long flags)
true
if the specified flags
represent a reader.flags
- flags value to checktrue
if the reader bit is set, false
otherwisepublic static boolean isAdmin(long flags)
true
if the specified flags
represent an admin.flags
- flags value to checktrue
if the admin bit is set, false
otherwisepublic static boolean isWriter(long flags)
true
if the specified flags
represent a writer.flags
- flags value to checktrue
if the writer bit is set, false
otherwisepublic static boolean isAck(long flags)
true
if the specified flags
represent ack required.flags
- flags value to checktrue
if the ack required bit is set, false
otherwiseCopyright © 2023 Bloomberg L.P.. All rights reserved.