org.apache.activemq.store.kahadb
Class TempMessageDatabase

java.lang.Object
  extended by org.apache.activemq.store.kahadb.TempMessageDatabase
Direct Known Subclasses:
TempKahaDBStore

public class TempMessageDatabase
extends Object


Nested Class Summary
protected static class TempMessageDatabase.MessageKeysMarshaller
           
protected  class TempMessageDatabase.StoredDestinationMarshaller
           
 
Field Summary
static int CLOSED_STATE
           
protected  BTreeIndex<String,org.apache.activemq.store.kahadb.TempMessageDatabase.StoredDestination> destinations
           
protected  File directory
           
protected  Object indexMutex
           
protected  LinkedHashMap<TransactionId,ArrayList<org.apache.activemq.store.kahadb.TempMessageDatabase.Operation>> inflightTransactions
           
static int OPEN_STATE
           
protected  AtomicBoolean opened
           
protected  PageFile pageFile
           
protected  LinkedHashMap<TransactionId,ArrayList<org.apache.activemq.store.kahadb.TempMessageDatabase.Operation>> preparedTransactions
           
protected  AtomicBoolean started
           
 
Constructor Summary
TempMessageDatabase()
           
 
Method Summary
 void close()
           
 File getDirectory()
           
 int getIndexWriteBatchSize()
           
 HashSet<Integer> getJournalFilesBeingReplicated()
           
 PageFile getPageFile()
           
protected  org.apache.activemq.store.kahadb.TempMessageDatabase.StoredDestination getStoredDestination(KahaDestination destination, Transaction tx)
           
 void load()
           
 void open()
           
 void process(KahaRemoveDestinationCommand command)
           
 void process(KahaSubscriptionCommand command)
           
 void processAdd(KahaAddMessageCommand command, TransactionId txid, ByteSequence data)
           
 void processCommit(TransactionId key)
           
 void processPrepare(TransactionId key)
           
 void processRemove(KahaRemoveMessageCommand command, TransactionId txid)
           
 void processRollback(TransactionId key)
           
 void setDirectory(File directory)
           
 void setEnableIndexWriteAsync(boolean enableIndexWriteAsync)
           
 void setIndexWriteBatchSize(int setIndexWriteBatchSize)
           
 void start()
           
 void stop()
           
 void unload()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLOSED_STATE

public static final int CLOSED_STATE
See Also:
Constant Field Values

OPEN_STATE

public static final int OPEN_STATE
See Also:
Constant Field Values

destinations

protected BTreeIndex<String,org.apache.activemq.store.kahadb.TempMessageDatabase.StoredDestination> destinations

pageFile

protected PageFile pageFile

directory

protected File directory

started

protected AtomicBoolean started

opened

protected AtomicBoolean opened

indexMutex

protected final Object indexMutex

inflightTransactions

protected final LinkedHashMap<TransactionId,ArrayList<org.apache.activemq.store.kahadb.TempMessageDatabase.Operation>> inflightTransactions

preparedTransactions

protected final LinkedHashMap<TransactionId,ArrayList<org.apache.activemq.store.kahadb.TempMessageDatabase.Operation>> preparedTransactions
Constructor Detail

TempMessageDatabase

public TempMessageDatabase()
Method Detail

start

public void start()
           throws Exception
Throws:
Exception

stop

public void stop()
          throws Exception
Throws:
Exception

open

public void open()
          throws IOException
Throws:
IOException

load

public void load()
          throws IOException
Throws:
IOException

close

public void close()
           throws IOException,
                  InterruptedException
Throws:
IOException
InterruptedException

unload

public void unload()
            throws IOException,
                   InterruptedException
Throws:
IOException
InterruptedException

processAdd

public void processAdd(KahaAddMessageCommand command,
                       TransactionId txid,
                       ByteSequence data)
                throws IOException
Throws:
IOException

processRemove

public void processRemove(KahaRemoveMessageCommand command,
                          TransactionId txid)
                   throws IOException
Throws:
IOException

process

public void process(KahaRemoveDestinationCommand command)
             throws IOException
Throws:
IOException

process

public void process(KahaSubscriptionCommand command)
             throws IOException
Throws:
IOException

processCommit

public void processCommit(TransactionId key)
                   throws IOException
Throws:
IOException

processPrepare

public void processPrepare(TransactionId key)

processRollback

public void processRollback(TransactionId key)

getJournalFilesBeingReplicated

public HashSet<Integer> getJournalFilesBeingReplicated()

getStoredDestination

protected org.apache.activemq.store.kahadb.TempMessageDatabase.StoredDestination getStoredDestination(KahaDestination destination,
                                                                                                      Transaction tx)
                                                                                               throws IOException
Throws:
IOException

getDirectory

public File getDirectory()

setDirectory

public void setDirectory(File directory)

setIndexWriteBatchSize

public void setIndexWriteBatchSize(int setIndexWriteBatchSize)

getIndexWriteBatchSize

public int getIndexWriteBatchSize()

setEnableIndexWriteAsync

public void setEnableIndexWriteAsync(boolean enableIndexWriteAsync)

getPageFile

public PageFile getPageFile()


Copyright © 2005–2013 The Apache Software Foundation. All rights reserved.