org.apache.activemq.store
Interface ReferenceStoreAdapter

All Superinterfaces:
PersistenceAdapter, Service
All Known Implementing Classes:
KahaReferenceStoreAdapter

public interface ReferenceStoreAdapter
extends PersistenceAdapter

Adapter to the actual persistence mechanism used with ActiveMQ


Method Summary
 void clearMessages()
          called by recover to clear out message references
 ReferenceStore createQueueReferenceStore(ActiveMQQueue destination)
          Factory method to create a new queue message store with the given destination name
 TopicReferenceStore createTopicReferenceStore(ActiveMQTopic destination)
          Factory method to create a new topic message store with the given destination name
 long getMaxDataFileLength()
           
 Set<Integer> getReferenceFileIdsInUse()
           
 boolean isStoreValid()
          If the store isn't valid, it can be recoverd at start-up
 void recoverState()
          recover any state
 void recoverSubscription(SubscriptionInfo info)
          Recover particular subscription.
 Map<TransactionId,AMQTx> retrievePreparedState()
           
 void savePreparedState(Map<TransactionId,AMQTx> map)
          Save prepared transactions
 void setMaxDataFileLength(long maxDataFileLength)
          set the max data length of a reference data log - if used
 
Methods inherited from interface org.apache.activemq.store.PersistenceAdapter
beginTransaction, checkpoint, commitTransaction, createQueueMessageStore, createTopicMessageStore, createTransactionStore, deleteAllMessages, getDestinations, getDirectory, getLastMessageBrokerSequenceId, getLastProducerSequenceId, removeQueueMessageStore, removeTopicMessageStore, rollbackTransaction, setBrokerName, setDirectory, setUsageManager, size
 
Methods inherited from interface org.apache.activemq.Service
start, stop
 

Method Detail

createQueueReferenceStore

ReferenceStore createQueueReferenceStore(ActiveMQQueue destination)
                                         throws IOException
Factory method to create a new queue message store with the given destination name

Parameters:
destination -
Returns:
the QueueReferenceStore
Throws:
IOException

createTopicReferenceStore

TopicReferenceStore createTopicReferenceStore(ActiveMQTopic destination)
                                              throws IOException
Factory method to create a new topic message store with the given destination name

Parameters:
destination -
Returns:
the TopicRefererenceStore
Throws:
IOException

getReferenceFileIdsInUse

Set<Integer> getReferenceFileIdsInUse()
                                      throws IOException
Returns:
Set of File ids in use
Throws:
IOException

isStoreValid

boolean isStoreValid()
If the store isn't valid, it can be recoverd at start-up

Returns:
true if the reference store is in a consistent state

clearMessages

void clearMessages()
                   throws IOException
called by recover to clear out message references

Throws:
IOException

recoverState

void recoverState()
                  throws IOException
recover any state

Throws:
IOException

savePreparedState

void savePreparedState(Map<TransactionId,AMQTx> map)
                       throws IOException
Save prepared transactions

Parameters:
map -
Throws:
IOException

retrievePreparedState

Map<TransactionId,AMQTx> retrievePreparedState()
                                               throws IOException
Returns:
saved prepared transactions
Throws:
IOException

getMaxDataFileLength

long getMaxDataFileLength()
Returns:
the maxDataFileLength

setMaxDataFileLength

void setMaxDataFileLength(long maxDataFileLength)
set the max data length of a reference data log - if used

Parameters:
maxDataFileLength -

recoverSubscription

void recoverSubscription(SubscriptionInfo info)
                         throws IOException
Recover particular subscription. Used for recovery of durable consumers

Parameters:
info -
Throws:
IOException


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