public class HashIndex<Key,Value> extends Object implements Index<Key,Value>
Modifier and Type | Field and Description |
---|---|
static int |
HEADER_SIZE |
static org.fusesource.hawtbuf.Buffer |
MAGIC |
Constructor and Description |
---|
HashIndex(Paged paged,
int page,
HashIndexFactory<Key,Value> factory) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
clear the index
|
boolean |
containsKey(Key key) |
HashIndex<Key,Value> |
create() |
void |
destroy()
Frees any extra storage that the index created.
|
Value |
get(Key key) |
int |
getIndexLocation() |
boolean |
isEmpty() |
HashIndex<Key,Value> |
open() |
Value |
put(Key key,
Value value)
store the key, item
|
Value |
putIfAbsent(Key key,
Value value)
get the value at the given key, or put it if null.
|
Value |
remove(Key key)
remove the index key
|
int |
size() |
String |
toString() |
public static final org.fusesource.hawtbuf.Buffer MAGIC
public static final int HEADER_SIZE
public HashIndex(Paged paged, int page, HashIndexFactory<Key,Value> factory)
public boolean containsKey(Key key)
containsKey
in interface Index<Key,Value>
public Value put(Key key, Value value)
Index
public Value putIfAbsent(Key key, Value value)
Index
putIfAbsent
in interface Index<Key,Value>
public void clear()
Index
public void destroy()
Index
public int getIndexLocation()
getIndexLocation
in interface Index<Key,Value>
Copyright © 2009–2016 FuseSource, Corp.. All rights reserved.