public class PersistentMapBasedForwardIndex extends java.lang.Object implements ForwardIndex
Constructor and Description |
---|
PersistentMapBasedForwardIndex(java.nio.file.Path mapFile,
boolean isReadOnly) |
PersistentMapBasedForwardIndex(java.nio.file.Path mapFile,
boolean useChunks,
boolean isReadOnly) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
void |
close() |
boolean |
containsMapping(int key) |
protected PersistentHashMap<java.lang.Integer,ByteArraySequence> |
createMap(java.nio.file.Path file) |
void |
force() |
ByteArraySequence |
get(java.lang.Integer key) |
void |
put(java.lang.Integer key,
ByteArraySequence value) |
public PersistentMapBasedForwardIndex(java.nio.file.Path mapFile, boolean isReadOnly) throws java.io.IOException
java.io.IOException
public PersistentMapBasedForwardIndex(java.nio.file.Path mapFile, boolean useChunks, boolean isReadOnly) throws java.io.IOException
java.io.IOException
protected PersistentHashMap<java.lang.Integer,ByteArraySequence> createMap(java.nio.file.Path file) throws java.io.IOException
java.io.IOException
public ByteArraySequence get(java.lang.Integer key) throws java.io.IOException
get
in interface ForwardIndex
get
in interface KeyValueStore<java.lang.Integer,ByteArraySequence>
java.io.IOException
public void put(java.lang.Integer key, ByteArraySequence value) throws java.io.IOException
put
in interface ForwardIndex
put
in interface KeyValueStore<java.lang.Integer,ByteArraySequence>
java.io.IOException
public void force()
force
in interface KeyValueStore<java.lang.Integer,ByteArraySequence>
public void clear() throws java.io.IOException
clear
in interface ForwardIndex
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException
public boolean containsMapping(int key) throws java.io.IOException
java.io.IOException