public final class DataManagerImpl extends 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(File dir,
String name,
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() |
String |
getName() |
SyncDataFileReader |
getReader() |
Marshaller |
getRedoMarshaller() |
SyncDataFileWriter |
getWriter() |
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,
Object payload) |
StoreLocation |
storeRedoItem(Object payload) |
String |
toString() |
void |
updateItem(StoreLocation location,
Marshaller marshaller,
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(File dir, String name, AtomicLong storeSize)
public String getName()
getName in interface DataManagerpublic Object readItem(Marshaller marshaller, StoreLocation item) throws IOException
readItem in interface DataManagerIOExceptionpublic StoreLocation storeDataItem(Marshaller marshaller, Object payload) throws IOException
storeDataItem in interface DataManagerIOExceptionpublic StoreLocation storeRedoItem(Object payload) throws IOException
storeRedoItem in interface DataManagerIOExceptionpublic void updateItem(StoreLocation location, Marshaller marshaller, Object payload) throws IOException
updateItem in interface DataManagerIOExceptionpublic void recoverRedoItems(RedoListener listener) throws IOException
recoverRedoItems in interface DataManagerIOExceptionpublic void close() throws IOException
close in interface DataManagerIOExceptionpublic void force() throws IOException
force in interface DataManagerIOExceptionpublic boolean delete() throws IOException
delete in interface DataManagerIOExceptionpublic void addInterestInFile(int file) throws IOException
addInterestInFile in interface DataManagerIOExceptionpublic void removeInterestInFile(int file) throws IOException
removeInterestInFile in interface DataManagerIOExceptionpublic void consolidateDataFiles() throws IOException
consolidateDataFiles in interface DataManagerIOExceptionpublic 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 SyncDataFileReader getReader()
protected SyncDataFileReader createReader()
public void setReader(SyncDataFileReader reader)
public SyncDataFileWriter getWriter()
public void setWriter(SyncDataFileWriter writer)
Copyright © 2005–2017. All rights reserved.