org.apache.activemq.broker.region.policy
Interface SubscriptionRecoveryPolicy

All Superinterfaces:
Service
All Known Implementing Classes:
FixedCountSubscriptionRecoveryPolicy, FixedSizedSubscriptionRecoveryPolicy, LastImageSubscriptionRecoveryPolicy, NoSubscriptionRecoveryPolicy, QueryBasedSubscriptionRecoveryPolicy, TimedSubscriptionRecoveryPolicy

public interface SubscriptionRecoveryPolicy
extends Service

Abstraction to allow different recovery policies to be plugged into the region implementations. This is used by a topic to retroactively recover messages that the subscription missed.


Method Summary
 boolean add(ConnectionContext context, MessageReference message)
          A message was sent to the destination.
 Message[] browse(ActiveMQDestination dest)
           
 SubscriptionRecoveryPolicy copy()
          Used to copy the policy object.
 void recover(ConnectionContext context, Topic topic, SubscriptionRecovery sub)
          Let a subscription recover message held by the policy.
 void setBroker(Broker broker)
           
 
Methods inherited from interface org.apache.activemq.Service
start, stop
 

Method Detail

add

boolean add(ConnectionContext context,
            MessageReference message)
            throws Exception
A message was sent to the destination.

Parameters:
context -
message -
node -
Returns:
true if successful
Throws:
Exception

recover

void recover(ConnectionContext context,
             Topic topic,
             SubscriptionRecovery sub)
             throws Exception
Let a subscription recover message held by the policy.

Parameters:
context -
topic -
sub -
node -
Throws:
Exception

browse

Message[] browse(ActiveMQDestination dest)
                 throws Exception
Parameters:
dest -
Returns:
messages
Throws:
Exception

copy

SubscriptionRecoveryPolicy copy()
Used to copy the policy object.

Returns:
the copy

setBroker

void setBroker(Broker broker)


Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.