public class JmsDefaultPrefetchPolicy extends Object implements JmsPrefetchPolicy
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_DURABLE_TOPIC_PREFETCH |
static int |
DEFAULT_QUEUE_BROWSER_PREFETCH |
static int |
DEFAULT_QUEUE_PREFETCH |
static int |
DEFAULT_TOPIC_PREFETCH |
static int |
MAX_PREFETCH_SIZE |
| Constructor and Description |
|---|
JmsDefaultPrefetchPolicy()
Initialize default prefetch policies
|
JmsDefaultPrefetchPolicy(JmsDefaultPrefetchPolicy source)
Creates a new JmsPrefetchPolicy instance copied from the source policy.
|
| Modifier and Type | Method and Description |
|---|---|
JmsDefaultPrefetchPolicy |
copy()
Copy this policy into a newly allocated instance.
|
boolean |
equals(Object obj) |
int |
getConfiguredPrefetch(JmsSession session,
JmsDestination destination,
boolean durable,
boolean browser)
Returns the prefetch value to use when creating a MessageConsumer instance.
|
int |
getDurableTopicPrefetch() |
int |
getMaxPrefetchSize()
Gets the currently configured max prefetch size value.
|
int |
getQueueBrowserPrefetch() |
int |
getQueuePrefetch() |
int |
getTopicPrefetch() |
int |
hashCode() |
void |
setAll(int prefetch)
Sets the prefetch values for all options in this policy to the set limit.
|
void |
setDurableTopicPrefetch(int durableTopicPrefetch)
Sets the durable topic prefetch value, this value is limited by the max
prefetch size setting.
|
void |
setMaxPrefetchSize(int maxPrefetchSize)
Sets the maximum prefetch size value.
|
void |
setQueueBrowserPrefetch(int queueBrowserPrefetch) |
void |
setQueuePrefetch(int queuePrefetch) |
void |
setTopicPrefetch(int topicPrefetch) |
public static final int MAX_PREFETCH_SIZE
public static final int DEFAULT_QUEUE_PREFETCH
public static final int DEFAULT_QUEUE_BROWSER_PREFETCH
public static final int DEFAULT_DURABLE_TOPIC_PREFETCH
public static final int DEFAULT_TOPIC_PREFETCH
public JmsDefaultPrefetchPolicy()
public JmsDefaultPrefetchPolicy(JmsDefaultPrefetchPolicy source)
source - The policy instance to copy values from.public JmsDefaultPrefetchPolicy copy()
JmsPrefetchPolicycopy in interface JmsPrefetchPolicypublic int getConfiguredPrefetch(JmsSession session, JmsDestination destination, boolean durable, boolean browser)
JmsPrefetchPolicygetConfiguredPrefetch in interface JmsPrefetchPolicysession - 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).public int getDurableTopicPrefetch()
public void setDurableTopicPrefetch(int durableTopicPrefetch)
durableTopicPrefetch - The durableTopicPrefetch to set.public int getQueuePrefetch()
public void setQueuePrefetch(int queuePrefetch)
queuePrefetch - The queuePrefetch to set.public int getQueueBrowserPrefetch()
public void setQueueBrowserPrefetch(int queueBrowserPrefetch)
queueBrowserPrefetch - The queueBrowserPrefetch to set.public int getTopicPrefetch()
public void setTopicPrefetch(int topicPrefetch)
topicPrefetch - The topicPrefetch to set.public int getMaxPrefetchSize()
public void setMaxPrefetchSize(int maxPrefetchSize)
maxPrefetchSize - The maximum allowed value for any of the prefetch size options.public void setAll(int prefetch)
prefetch - The prefetch value to apply to all prefetch limits.Copyright © 2013–2019 The Apache Software Foundation. All rights reserved.