com.tibco.tibjms.admin

## Class RVQueuePolicy

- java.lang.Object
- - com.tibco.tibjms.admin.RVQueuePolicy

-     public class RVQueuePolicy
      extends java.lang.Object

  This class represents the discard policy of the TIBCO Rendezvous queues used internally by the TIBCO EMS Server when importing messages from TIBCO Rendezvous. Each transport uses a TIBCO RV queue, and therefore a discard policy can be defined per transport. The default policy, if omitted, is `TIBRVQUEUE_DISCARD_NONE`, which means that no message is ever discarded.
  Note that in a fast producer situation, this can lead to a rapid TIBCO EMS process memory growth since the internal TIBCO RV queue may hold a lot of RV messages waiting to be processed as EMS messages.
  Specifying a discard policy other than `TIBRVQUEUE_DISCARD_NONE` causes excess TIBCO RV messages to be discarded, and therefore not imported by the TIBCO EMS Server, but help prevents unbound memory growth.
  Since:
    EMS 5.0

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `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).
    `static int` | `TIBRVQUEUE_DISCARD_LAST` Discard the last event in the queue (that is, the youngest event in the queue).
    `static int` | `TIBRVQUEUE_DISCARD_NONE` Never discard events; use this policy when a queue has no limit on the number of events it can contain.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getDiscardAmount()` When the TIBCO RV queue exceeds its maximum message limit, discard a block of messages.
    `int` | `getMaxEvents()` The maximum number of messages that the TIBCO RV queue can hold before starting to discard messages.
    `int` | `getPolicy()` Returns the policy of this discard policy.
    `java.lang.String` | `getPolicyName()` Returns a string representation of the discard policy.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### TIBRVQUEUE_DISCARD_NONE

          public static final int TIBRVQUEUE_DISCARD_NONE

      Never discard events; use this policy when a queue has no limit on the number of events it can contain.
      See Also:
        Constant Field Values

    - #### TIBRVQUEUE_DISCARD_FIRST

          public static final int 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).
      See Also:
        Constant Field Values

    - #### TIBRVQUEUE_DISCARD_LAST

          public static final int TIBRVQUEUE_DISCARD_LAST

      Discard the last event in the queue (that is, the youngest event in the queue).
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getPolicy

          public int getPolicy()

      Returns the policy of this discard policy.
      Returns:
        the policy of this discard policy

    - #### getPolicyName

          public java.lang.String getPolicyName()

      Returns a string representation of the discard policy.
      Returns:
        the name of the discard policy

    - #### getMaxEvents

          public int getMaxEvents()

      The maximum number of messages that the TIBCO RV queue can hold before starting to discard messages.
      Returns:
        the number of events (messages) that the RV Queue can hold, or 0 if policy is `TIBRVQUEUE_DISCARD_NONE`

    - #### getDiscardAmount

          public int getDiscardAmount()

      When the TIBCO RV queue exceeds its maximum message limit, discard a block of messages. This value is the number of messages to discard.
      Returns:
        the number of messages to discard when the RV queue exceeds its maximum event limit, or 0 if policy is `TIBRVQUEUE_DISCARD_NONE`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright © Cloud Software Group, Inc. All rights reserved