public final class DataManagerImpl extends java.lang.Object implements DataManager
| Modifier and Type | Field and Description |
|---|---|
static byte |
DATA_ITEM_TYPE |
static int |
ITEM_HEAD_SIZE |
static long |
MAX_FILE_LENGTH |
static byte |
REDO_ITEM_TYPE |
| Constructor and Description |
|---|
DataManagerImpl(java.io.File dir,
java.lang.String name,
java.util.concurrent.atomic.AtomicLong storeSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
addInterestInFile(int file) |
void |
close() |
void |
consolidateDataFiles() |
protected SyncDataFileReader |
createReader() |
boolean |
delete() |
void |
force() |
long |
getMaxFileLength() |
java.lang.String |
getName() |
SyncDataFileReader |
getReader() |
Marshaller |
getRedoMarshaller() |
SyncDataFileWriter |
getWriter() |
java.lang.Object |
readItem(Marshaller marshaller,
StoreLocation item) |
void |
recoverRedoItems(RedoListener listener) |
void |
removeInterestInFile(int file) |
void |
setMaxFileLength(long maxFileLength) |
void |
setReader(SyncDataFileReader reader) |
void |
setRedoMarshaller(Marshaller redoMarshaller) |
void |
setWriter(SyncDataFileWriter writer) |
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) |
public static final int ITEM_HEAD_SIZE
public static final byte DATA_ITEM_TYPE
public static final byte REDO_ITEM_TYPE
public static final long MAX_FILE_LENGTH
public DataManagerImpl(java.io.File dir, java.lang.String name, java.util.concurrent.atomic.AtomicLong storeSize)
public java.lang.String getName()
getName in interface DataManagerpublic java.lang.Object readItem(Marshaller marshaller, StoreLocation item) throws java.io.IOException
readItem in interface DataManagerjava.io.IOExceptionpublic StoreLocation storeDataItem(Marshaller marshaller, java.lang.Object payload) throws java.io.IOException
storeDataItem in interface DataManagerjava.io.IOExceptionpublic StoreLocation storeRedoItem(java.lang.Object payload) throws java.io.IOException
storeRedoItem in interface DataManagerjava.io.IOExceptionpublic void updateItem(StoreLocation location, Marshaller marshaller, java.lang.Object payload) throws java.io.IOException
updateItem in interface DataManagerjava.io.IOExceptionpublic void recoverRedoItems(RedoListener listener) throws java.io.IOException
recoverRedoItems in interface DataManagerjava.io.IOExceptionpublic void close() throws java.io.IOException
close in interface DataManagerjava.io.IOExceptionpublic void force() throws java.io.IOException
force in interface DataManagerjava.io.IOExceptionpublic boolean delete() throws java.io.IOException
delete in interface DataManagerjava.io.IOExceptionpublic void addInterestInFile(int file) throws java.io.IOException
addInterestInFile in interface DataManagerjava.io.IOExceptionpublic void removeInterestInFile(int file) throws java.io.IOException
removeInterestInFile in interface DataManagerjava.io.IOExceptionpublic void consolidateDataFiles() throws java.io.IOException
consolidateDataFiles in interface DataManagerjava.io.IOExceptionpublic Marshaller getRedoMarshaller()
getRedoMarshaller in interface DataManagerpublic void setRedoMarshaller(Marshaller redoMarshaller)
setRedoMarshaller in interface DataManagerpublic long getMaxFileLength()
public void setMaxFileLength(long maxFileLength)
maxFileLength - the maxFileLength to setpublic java.lang.String toString()
toString in class java.lang.Objectpublic SyncDataFileReader getReader()
protected SyncDataFileReader createReader()
public void setReader(SyncDataFileReader reader)
public SyncDataFileWriter getWriter()
public void setWriter(SyncDataFileWriter writer)
Copyright © 2005-2012. All Rights Reserved.