public class FileStore extends AbstractDataStore implements com.ohmdb.abstracts.DataStore, Runnable
| Modifier and Type | Field and Description |
|---|---|
static int |
BLOCK_OVERHEAD |
static int |
BLOCK_SIZE |
protected static int |
BUF_SIZE |
protected AtomicBoolean |
finished |
static int |
FIRST_CAP |
protected static int |
HEADER_SIZE |
protected static int |
MAX_BLOCKS |
running| Constructor and Description |
|---|
FileStore(String filename,
StoreLoader loader,
StoreCodec<?> valueCodec,
OhmDBStats stats,
boolean loadOnly,
WeakReference<com.ohmdb.api.Db> dbRef) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
void |
commit(com.ohmdb.abstracts.DatastoreTransaction tx) |
void |
delete(long key) |
long |
getFileSize() |
Map<DbStats,Object> |
getStats() |
void |
rollback(com.ohmdb.abstracts.DatastoreTransaction tx) |
void |
run() |
void |
shutdown() |
void |
stop() |
FilestoreTransaction |
transaction() |
void |
write(long key,
Object value) |
checkActivepublic static final int BLOCK_OVERHEAD
public static final int FIRST_CAP
public static final int BLOCK_SIZE
protected static final int BUF_SIZE
protected static final int MAX_BLOCKS
protected static final int HEADER_SIZE
protected AtomicBoolean finished
public FileStore(String filename, StoreLoader loader, StoreCodec<?> valueCodec, OhmDBStats stats, boolean loadOnly, WeakReference<com.ohmdb.api.Db> dbRef)
public void write(long key,
Object value)
throws IOException
write in interface com.ohmdb.abstracts.DataStoreIOExceptionpublic void delete(long key)
throws IOException
delete in interface com.ohmdb.abstracts.DataStoreIOExceptionpublic long getFileSize()
getFileSize in interface com.ohmdb.abstracts.DataStorepublic FilestoreTransaction transaction()
transaction in interface com.ohmdb.abstracts.DataStorepublic void clear()
clear in interface com.ohmdb.abstracts.DataStorepublic void commit(com.ohmdb.abstracts.DatastoreTransaction tx)
commit in interface com.ohmdb.abstracts.DataStorepublic void rollback(com.ohmdb.abstracts.DatastoreTransaction tx)
rollback in interface com.ohmdb.abstracts.DataStorepublic void stop()
stop in interface com.ohmdb.abstracts.DataStorestop in class AbstractDataStorepublic void shutdown()
shutdown in interface com.ohmdb.abstracts.DataStoreshutdown in class AbstractDataStoreCopyright © 2013–2014 Nikolche Mihajlovski. All rights reserved.