public class FixedSizedSubscriptionRecoveryPolicy extends Object implements SubscriptionRecoveryPolicy
SubscriptionRecoveryPolicy will keep a fixed
amount of memory available in RAM for message history which is evicted in
time order.| Constructor and Description |
|---|
FixedSizedSubscriptionRecoveryPolicy() |
| 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.
|
protected MessageList |
createMessageList() |
MessageList |
getBuffer() |
int |
getMaximumSize() |
boolean |
isUseSharedBuffer() |
void |
recover(ConnectionContext context,
Topic topic,
SubscriptionRecovery sub)
Let a subscription recover message held by the policy.
|
void |
setBroker(Broker broker) |
void |
setBuffer(MessageList buffer) |
void |
setMaximumSize(int maximumSize)
Sets the maximum amount of RAM in bytes that this buffer can hold in RAM
|
void |
setUseSharedBuffer(boolean useSharedBuffer) |
void |
start() |
void |
stop() |
public FixedSizedSubscriptionRecoveryPolicy()
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 start() throws Exception
start in interface org.apache.activemq.ServiceExceptionpublic void stop() throws Exception
stop in interface org.apache.activemq.ServiceExceptionpublic MessageList getBuffer()
public void setBuffer(MessageList buffer)
public int getMaximumSize()
public void setMaximumSize(int maximumSize)
public boolean isUseSharedBuffer()
public void setUseSharedBuffer(boolean useSharedBuffer)
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 SubscriptionRecoveryPolicyprotected MessageList createMessageList()
Copyright © 2005–2020 The Apache Software Foundation. All rights reserved.