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.IOExceptionpublic PersistentMapBasedForwardIndex(java.nio.file.Path mapFile,
boolean useChunks,
boolean isReadOnly)
throws java.io.IOException
java.io.IOExceptionprotected PersistentHashMap<java.lang.Integer,ByteArraySequence> createMap(java.nio.file.Path file) throws java.io.IOException
java.io.IOExceptionpublic ByteArraySequence get(java.lang.Integer key) throws java.io.IOException
get in interface ForwardIndexget in interface KeyValueStore<java.lang.Integer,ByteArraySequence>java.io.IOExceptionpublic void put(java.lang.Integer key,
ByteArraySequence value)
throws java.io.IOException
put in interface ForwardIndexput in interface KeyValueStore<java.lang.Integer,ByteArraySequence>java.io.IOExceptionpublic void force()
force in interface KeyValueStore<java.lang.Integer,ByteArraySequence>public void clear()
throws java.io.IOException
clear in interface ForwardIndexjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionpublic boolean containsMapping(int key)
throws java.io.IOException
java.io.IOException