org.apache.activemq.kaha.impl.data
Class DataManager

java.lang.Object
  extended by org.apache.activemq.kaha.impl.data.DataManager

public final class DataManager
extends java.lang.Object

Manages DataFiles

Version:
$Revision: 1.1.1.1 $

Field Summary
static byte DATA_ITEM_TYPE
           
static int ITEM_HEAD_SIZE
           
static long MAX_FILE_LENGTH
           
static byte REDO_ITEM_TYPE
           
 
Constructor Summary
DataManager(java.io.File dir, java.lang.String name)
           
 
Method Summary
 void addInterestInFile(int file)
           
 void close()
           
 void consolidateDataFiles()
           
 boolean delete()
           
 void force()
           
 long getMaxFileLength()
           
 java.lang.String getName()
           
 Marshaller getRedoMarshaller()
           
 java.lang.Object readItem(Marshaller marshaller, StoreLocation item)
           
 void recoverRedoItems(RedoListener listener)
           
 void removeInterestInFile(int file)
           
 void setMaxFileLength(long maxFileLength)
           
 void setRedoMarshaller(Marshaller redoMarshaller)
           
 StoreLocation storeDataItem(Marshaller marshaller, java.lang.Object payload)
           
 StoreLocation storeRedoItem(java.lang.Object payload)
           
 java.lang.String toString()
           
 void updateItem(StoreLocation location, Marshaller marshaller, java.lang.Object payload)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_FILE_LENGTH

public static long MAX_FILE_LENGTH

ITEM_HEAD_SIZE

public static final int ITEM_HEAD_SIZE
See Also:
Constant Field Values

DATA_ITEM_TYPE

public static final byte DATA_ITEM_TYPE
See Also:
Constant Field Values

REDO_ITEM_TYPE

public static final byte REDO_ITEM_TYPE
See Also:
Constant Field Values
Constructor Detail

DataManager

public DataManager(java.io.File dir,
                   java.lang.String name)
Method Detail

getName

public java.lang.String getName()

readItem

public java.lang.Object readItem(Marshaller marshaller,
                                 StoreLocation item)
                          throws java.io.IOException
Throws:
java.io.IOException

storeDataItem

public StoreLocation storeDataItem(Marshaller marshaller,
                                   java.lang.Object payload)
                            throws java.io.IOException
Throws:
java.io.IOException

storeRedoItem

public StoreLocation storeRedoItem(java.lang.Object payload)
                            throws java.io.IOException
Throws:
java.io.IOException

updateItem

public void updateItem(StoreLocation location,
                       Marshaller marshaller,
                       java.lang.Object payload)
                throws java.io.IOException
Throws:
java.io.IOException

recoverRedoItems

public void recoverRedoItems(RedoListener listener)
                      throws java.io.IOException
Throws:
java.io.IOException

close

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

force

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

delete

public boolean delete()
               throws java.io.IOException
Throws:
java.io.IOException

addInterestInFile

public void addInterestInFile(int file)
                       throws java.io.IOException
Throws:
java.io.IOException

removeInterestInFile

public void removeInterestInFile(int file)
                          throws java.io.IOException
Throws:
java.io.IOException

consolidateDataFiles

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

getRedoMarshaller

public Marshaller getRedoMarshaller()

setRedoMarshaller

public void setRedoMarshaller(Marshaller redoMarshaller)

getMaxFileLength

public long getMaxFileLength()
Returns:
the maxFileLength

setMaxFileLength

public void setMaxFileLength(long maxFileLength)
Parameters:
maxFileLength - the maxFileLength to set

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2010 Apache Software Foundation. All Rights Reserved.