public class TimedSubscriptionRecoveryPolicy extends Object implements SubscriptionRecoveryPolicy
SubscriptionRecoveryPolicy will keep a timed
buffer of messages around in memory and use that to recover new
subscriptions.| Constructor and Description |
|---|
TimedSubscriptionRecoveryPolicy() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(ConnectionContext context,
org.apache.activemq.broker.region.MessageReference message)
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.
|
void |
gc() |
long |
getRecoverDuration() |
void |
recover(ConnectionContext context,
Topic topic,
SubscriptionRecovery sub)
Let a subscription recover message held by the policy.
|
void |
setBroker(Broker broker) |
void |
setRecoverDuration(long recoverDuration) |
void |
start() |
void |
stop() |
public TimedSubscriptionRecoveryPolicy()
public SubscriptionRecoveryPolicy copy()
SubscriptionRecoveryPolicycopy in interface SubscriptionRecoveryPolicypublic boolean add(ConnectionContext context, org.apache.activemq.broker.region.MessageReference message) throws Exception
SubscriptionRecoveryPolicyadd in interface SubscriptionRecoveryPolicyExceptionpublic void recover(ConnectionContext context, Topic topic, SubscriptionRecovery sub) throws Exception
SubscriptionRecoveryPolicyrecover in interface SubscriptionRecoveryPolicyExceptionpublic void setBroker(Broker broker)
setBroker in interface SubscriptionRecoveryPolicypublic void start() throws Exception
start in interface org.apache.activemq.ServiceExceptionpublic void stop() throws Exception
stop in interface org.apache.activemq.ServiceExceptionpublic void gc()
public long getRecoverDuration()
public void setRecoverDuration(long recoverDuration)
public org.apache.activemq.command.Message[] browse(org.apache.activemq.command.ActiveMQDestination destination) throws Exception
browse in interface SubscriptionRecoveryPolicyExceptionCopyright © 2005–2020 The Apache Software Foundation. All rights reserved.