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 java.lang.Object


Nested Class Summary
protected static class TempMessageDatabase.MessageKeysMarshaller
           
protected  class TempMessageDatabase.StoredDestinationMarshaller
           
 
Field Summary
static int CLOSED_STATE
           
protected  BTreeIndex<java.lang.String,org.apache.activemq.store.kahadb.TempMessageDatabase.StoredDestination> destinations
           
protected  java.io.File directory
           
protected  java.lang.Object indexMutex
           
protected  java.util.LinkedHashMap<TransactionId,java.util.ArrayList<org.apache.activemq.store.kahadb.TempMessageDatabase.Operation>> inflightTransactions
           
static int OPEN_STATE
           
protected  java.util.concurrent.atomic.AtomicBoolean opened
           
protected  PageFile pageFile
           
protected  java.util.LinkedHashMap<TransactionId,java.util.ArrayList<org.apache.activemq.store.kahadb.TempMessageDatabase.Operation>> preparedTransactions
           
protected  java.util.concurrent.atomic.AtomicBoolean started
           
 
Constructor Summary
TempMessageDatabase()
           
 
Method Summary
 void close()
           
 java.io.File getDirectory()
           
 int getIndexWriteBatchSize()
           
 java.util.HashSet<java.lang.Integer> getJournalFilesBeingReplicated()
           
 PageFile getPageFile()
           
protected  org.apache.activemq.store.kahadb.TempMessageDatabase.StoredDestination getStoredDestination(org.apache.activemq.store.kahadb.data.KahaDestination destination, Transaction tx)
           
 void load()
           
 void open()
           
 void process(org.apache.activemq.store.kahadb.data.KahaRemoveDestinationCommand command)
           
 void process(org.apache.activemq.store.kahadb.data.KahaSubscriptionCommand command)
           
 void processAdd(org.apache.activemq.store.kahadb.data.KahaAddMessageCommand command, TransactionId txid, ByteSequence data)
           
 void processCommit(TransactionId key)
           
 void processPrepare(TransactionId key)
           
 void processRemove(org.apache.activemq.store.kahadb.data.KahaRemoveMessageCommand command, TransactionId txid)
           
 void processRollback(TransactionId key)
           
 void setDirectory(java.io.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<java.lang.String,org.apache.activemq.store.kahadb.TempMessageDatabase.StoredDestination> destinations

pageFile

protected PageFile pageFile

directory

protected java.io.File directory

started

protected java.util.concurrent.atomic.AtomicBoolean started

opened

protected java.util.concurrent.atomic.AtomicBoolean opened

indexMutex

protected final java.lang.Object indexMutex

inflightTransactions

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

preparedTransactions

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

TempMessageDatabase

public TempMessageDatabase()
Method Detail

start

public void start()
           throws java.lang.Exception
Throws:
java.lang.Exception

stop

public void stop()
          throws java.lang.Exception
Throws:
java.lang.Exception

open

public void open()
          throws java.io.IOException
Throws:
java.io.IOException

load

public void load()
          throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException,
                  java.lang.InterruptedException
Throws:
java.io.IOException
java.lang.InterruptedException

unload

public void unload()
            throws java.io.IOException,
                   java.lang.InterruptedException
Throws:
java.io.IOException
java.lang.InterruptedException

processAdd

public void processAdd(org.apache.activemq.store.kahadb.data.KahaAddMessageCommand command,
                       TransactionId txid,
                       ByteSequence data)
                throws java.io.IOException
Throws:
java.io.IOException

processRemove

public void processRemove(org.apache.activemq.store.kahadb.data.KahaRemoveMessageCommand command,
                          TransactionId txid)
                   throws java.io.IOException
Throws:
java.io.IOException

process

public void process(org.apache.activemq.store.kahadb.data.KahaRemoveDestinationCommand command)
             throws java.io.IOException
Throws:
java.io.IOException

process

public void process(org.apache.activemq.store.kahadb.data.KahaSubscriptionCommand command)
             throws java.io.IOException
Throws:
java.io.IOException

processCommit

public void processCommit(TransactionId key)
                   throws java.io.IOException
Throws:
java.io.IOException

processPrepare

public void processPrepare(TransactionId key)

processRollback

public void processRollback(TransactionId key)

getJournalFilesBeingReplicated

public java.util.HashSet<java.lang.Integer> getJournalFilesBeingReplicated()

getStoredDestination

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

getDirectory

public java.io.File getDirectory()

setDirectory

public void setDirectory(java.io.File directory)

setIndexWriteBatchSize

public void setIndexWriteBatchSize(int setIndexWriteBatchSize)

getIndexWriteBatchSize

public int getIndexWriteBatchSize()

setEnableIndexWriteAsync

public void setEnableIndexWriteAsync(boolean enableIndexWriteAsync)

getPageFile

public PageFile getPageFile()


Copyright © 2005-2011 FuseSource, Corp.. All Rights Reserved.