krati.store
Class IndexedDataStore
java.lang.Object
krati.store.IndexedDataStore
- All Implemented Interfaces:
- Iterable<Map.Entry<byte[],byte[]>>, DataStore<byte[],byte[]>
public class IndexedDataStore
- extends Object
- implements DataStore<byte[],byte[]>
IndexedDataStore.
- Author:
- jwu
Constructor Summary |
IndexedDataStore(File homeDir,
int batchSize,
int numSyncBatches,
int indexInitLevel,
int indexSegmentFileSizeMB,
SegmentFactory indexSegmentFactory,
int storeInitLevel,
int storeSegmentFileSizeMB,
SegmentFactory storeSegmentFactory)
|
IndexedDataStore(File homeDir,
int batchSize,
int numSyncBatches,
SegmentFactory indexSegmentFactory,
SegmentFactory storeSegmentFactory)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IndexedDataStore
public IndexedDataStore(File homeDir,
int batchSize,
int numSyncBatches,
SegmentFactory indexSegmentFactory,
SegmentFactory storeSegmentFactory)
throws Exception
- Throws:
Exception
IndexedDataStore
public IndexedDataStore(File homeDir,
int batchSize,
int numSyncBatches,
int indexInitLevel,
int indexSegmentFileSizeMB,
SegmentFactory indexSegmentFactory,
int storeInitLevel,
int storeSegmentFileSizeMB,
SegmentFactory storeSegmentFactory)
throws Exception
- Throws:
Exception
getIndexHome
public final File getIndexHome()
getStoreHome
public final File getStoreHome()
get
public byte[] get(byte[] key)
- Specified by:
get
in interface DataStore<byte[],byte[]>
put
public boolean put(byte[] key,
byte[] value)
throws Exception
- Specified by:
put
in interface DataStore<byte[],byte[]>
- Throws:
Exception
delete
public boolean delete(byte[] key)
throws Exception
- Specified by:
delete
in interface DataStore<byte[],byte[]>
- Throws:
Exception
clear
public void clear()
throws IOException
- Specified by:
clear
in interface DataStore<byte[],byte[]>
- Throws:
IOException
persist
public void persist()
throws IOException
- Specified by:
persist
in interface DataStore<byte[],byte[]>
- Throws:
IOException
sync
public void sync()
throws IOException
- Specified by:
sync
in interface DataStore<byte[],byte[]>
- Throws:
IOException
keyIterator
public Iterator<byte[]> keyIterator()
- Specified by:
keyIterator
in interface DataStore<byte[],byte[]>
iterator
public Iterator<Map.Entry<byte[],byte[]>> iterator()
- Specified by:
iterator
in interface Iterable<Map.Entry<byte[],byte[]>>
Copyright © 2011. All Rights Reserved.