org.apache.activemq.broker.region.policy
Class TimedSubscriptionRecoveryPolicy
java.lang.Object
org.apache.activemq.broker.region.policy.TimedSubscriptionRecoveryPolicy
- All Implemented Interfaces:
- SubscriptionRecoveryPolicy, Service
public class TimedSubscriptionRecoveryPolicy
- extends Object
- implements SubscriptionRecoveryPolicy
This implementation of SubscriptionRecoveryPolicy
will keep a timed
buffer of messages around in memory and use that to recover new
subscriptions.
- Version:
- $Revision$
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
scheduler
protected static final Scheduler scheduler
TimedSubscriptionRecoveryPolicy
public TimedSubscriptionRecoveryPolicy()
copy
public SubscriptionRecoveryPolicy copy()
- Description copied from interface:
SubscriptionRecoveryPolicy
- Used to copy the policy object.
- Specified by:
copy
in interface SubscriptionRecoveryPolicy
- Returns:
- the copy
add
public boolean add(ConnectionContext context,
MessageReference message)
throws Exception
- Description copied from interface:
SubscriptionRecoveryPolicy
- A message was sent to the destination.
- Specified by:
add
in interface SubscriptionRecoveryPolicy
- Returns:
- true if successful
- Throws:
Exception
recover
public void recover(ConnectionContext context,
Topic topic,
SubscriptionRecovery sub)
throws Exception
- Description copied from interface:
SubscriptionRecoveryPolicy
- Let a subscription recover message held by the policy.
- Specified by:
recover
in interface SubscriptionRecoveryPolicy
- Throws:
Exception
start
public void start()
throws Exception
- Specified by:
start
in interface Service
- Throws:
Exception
stop
public void stop()
throws Exception
- Specified by:
stop
in interface Service
- Throws:
Exception
gc
public void gc()
getRecoverDuration
public long getRecoverDuration()
setRecoverDuration
public void setRecoverDuration(long recoverDuration)
browse
public Message[] browse(ActiveMQDestination destination)
throws Exception
- Specified by:
browse
in interface SubscriptionRecoveryPolicy
- Returns:
- messages
- Throws:
Exception
Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.