Interface JmsPrefetchPolicy

  • All Known Implementing Classes:
    JmsDefaultPrefetchPolicy

    public interface JmsPrefetchPolicy
    Interface for all Prefetch Policy implementations. Allows for configuration of MessageConsumer prefetch during creation.
    • Method Detail

      • copy

        JmsPrefetchPolicy copy()
        Copy this policy into a newly allocated instance.
        Returns:
        a new JmsPrefetchPolicy that is a copy of this one.
      • getConfiguredPrefetch

        int getConfiguredPrefetch​(JmsSession session,
                                  JmsDestination destination,
                                  boolean durable,
                                  boolean browser)
        Returns the prefetch value to use when creating a MessageConsumer instance.
        Parameters:
        session - the Session that own the MessageConsumer being created. (null for a ConnectionConsumer).
        destination - the Destination that the consumer will be subscribed to.
        durable - indicates if the subscription being created is a durable subscription (Topics only).
        browser - indicates if the subscription being created is a message browser (Queues only).
        Returns:
        the prefetch value to assign the MessageConsumer being created.