Open topic with navigation

TIBCO Rendezvous® 8.8.0

# TibrvQueue

Class

## Declaration

    class com.tibco.tibrv.TibrvQueue
      extends java.lang.Object
      implements TibrvDispatchable

## Purpose

Event queue.

## Remarks

Each event is associated with a TibrvQueue object; when the event occurs, Rendezvous software places the event object in its queue. Programs dispatch queues to process events.

Programs must explicitly destroy instances of this class. Rendezvous software keeps internal references to these objects, so the Java garbage collector does not delete them automatically.

## Default Queue

The method Tibrv.defaultQueue() returns a pre-defined queue. Programs that need only one event queue can use this default queue (instead of using TibrvQueue() to create one). The default queue has priority 1, can hold an unlimited number of events, and never discards an event (since it never exceeds an event limit).

Rendezvous software places all advisories pertaining to queue overflow on the default queue.

Programs cannot destroy the default queue, except as a side effect of Tibrv.close(). Programs cannot change the parameters of the default queue.

## Limit Policy

These constants specify the possible strategies for resolving overflow of queue limit.

Constant | Description
`TibrvQueue.DISCARD_NONE` | Never discard events; use this policy when a queue has no limit on then number of events it can contain.
`TibrvQueue.DISCARD_FIRST` | Discard the first event in the queue (that is, the oldest event in the queue, which would otherwise be the next event to dispatch).
`TibrvQueue.DISCARD_LAST` | Discard the last event in the queue (that is, the youngest event in the queue).
`TibrvQueue.DISCARD_NEW` | Discard the new event (which would otherwise cause the queue to overflow its maximum events limit).

Method | Description
Life Cycle
TibrvQueue() | Create an event queue.
TibrvQueue.destroy() | Shared Library Files
TibrvQueue.isDefault() | Test whether a queue is the default queue.
TibrvQueue.isValid() | Test validity of a queue.
Dispatch
TibrvQueue.dispatch() | Dispatch an event; if no event is ready, block.
TibrvQueue.poll() | Dispatch an event, if possible.
TibrvQueue.timedDispatch() | Dispatch an event, but if no event is ready to dispatch, limit the time that this call blocks while waiting for an event.
Properties
TibrvQueue.getCount() | Extract the number of events in a queue.
TibrvQueue.getDiscardAmount() | Extract the discard amount of a queue.
TibrvQueue.getLimitPolicy() | Extract the limit policy of a queue.
TibrvQueue.getMaxEvents() | Extract the maximum event limit of a queue.
TibrvQueue.getName() | Extract the name of a queue.
TibrvQueue.getPriority() | Extract the priority of a queue.
TibrvQueue.setName() | Set the name of a queue.
TibrvQueue.setLimitPolicy() | Set the limit properties of a queue.
TibrvQueue.setPriority() | Set the priority of a queue.

Inherited Methods
`java.lang.Object.equals` `java.lang.Object.getClass` `java.lang.Object.hashCode` `java.lang.Object.notify` `java.lang.Object.notifyAll` `java.lang.Object.toString` (override) `java.lang.Object.wait`

Subtopics

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO Rendezvous®

Copyright © 1997-2025. Cloud Software Group, Inc. All Rights Reserved.