public class FixedCountSubscriptionRecoveryPolicy extends Object implements SubscriptionRecoveryPolicy
SubscriptionRecoveryPolicy will keep a fixed
count of last messages.| Constructor and Description |
|---|
FixedCountSubscriptionRecoveryPolicy() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(ConnectionContext context,
org.apache.activemq.broker.region.MessageReference node)
A message was sent to the destination.
|
org.apache.activemq.command.Message[] |
browse(org.apache.activemq.command.ActiveMQDestination destination) |
SubscriptionRecoveryPolicy |
copy()
Used to copy the policy object.
|
int |
getMaximumSize() |
void |
recover(ConnectionContext context,
Topic topic,
SubscriptionRecovery sub)
Let a subscription recover message held by the policy.
|
void |
setBroker(Broker broker) |
void |
setMaximumSize(int maximumSize)
Sets the maximum number of messages that this destination will hold
around in RAM
|
void |
start() |
void |
stop() |
public FixedCountSubscriptionRecoveryPolicy()
public SubscriptionRecoveryPolicy copy()
SubscriptionRecoveryPolicycopy in interface SubscriptionRecoveryPolicypublic boolean add(ConnectionContext context, org.apache.activemq.broker.region.MessageReference node) throws Exception
SubscriptionRecoveryPolicyadd in interface SubscriptionRecoveryPolicyExceptionpublic void recover(ConnectionContext context, Topic topic, SubscriptionRecovery sub) throws Exception
SubscriptionRecoveryPolicyrecover in interface SubscriptionRecoveryPolicyExceptionpublic void start() throws Exception
start in interface org.apache.activemq.ServiceExceptionpublic void stop() throws Exception
stop in interface org.apache.activemq.ServiceExceptionpublic int getMaximumSize()
public void setMaximumSize(int maximumSize)
public org.apache.activemq.command.Message[] browse(org.apache.activemq.command.ActiveMQDestination destination) throws Exception
browse in interface SubscriptionRecoveryPolicyExceptionpublic void setBroker(Broker broker)
setBroker in interface SubscriptionRecoveryPolicyCopyright © 2005–2020 The Apache Software Foundation. All rights reserved.