Modifier and Type | Field and Description |
---|---|
static int |
CLOSED_STATE |
static int |
DEFAULT_BIN_CAPACITY |
static int |
DEFAULT_LOAD_FACTOR |
static int |
DEFAULT_MAXIMUM_BIN_CAPACITY |
static int |
DEFAULT_MINIMUM_BIN_CAPACITY |
static int |
OPEN_STATE |
Constructor and Description |
---|
HashIndex(PageFile pageFile,
long pageId)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
clear(Transaction tx)
clear the index
|
boolean |
containsKey(Transaction tx,
Key key) |
Value |
get(Transaction tx,
Key key) |
int |
getActiveBins() |
int |
getBinCapacity() |
long |
getBinPageId() |
int |
getBinsActive() |
Marshaller<Key> |
getKeyMarshaller() |
int |
getLoadFactor() |
PageFile |
getPageFile() |
Marshaller<Value> |
getValueMarshaller() |
boolean |
isTransient() |
java.util.Iterator<java.util.Map.Entry<Key,Value>> |
iterator(Transaction tx) |
void |
load(Transaction tx)
load indexes
|
Value |
put(Transaction tx,
Key key,
Value value)
store the key, item
|
Value |
remove(Transaction tx,
Key key)
remove the index key
|
void |
setBinCapacity(int binCapacity) |
void |
setKeyMarshaller(Marshaller<Key> marshaller)
Set the marshaller for key objects
|
void |
setLoadFactor(int loadFactor) |
int |
setMaximumBinCapacity() |
void |
setMaximumBinCapacity(int maximumCapacity) |
void |
setValueMarshaller(Marshaller<Value> valueMarshaller)
Set the marshaller for value objects
|
int |
size(Transaction tx) |
void |
store(Transaction tx,
org.apache.kahadb.index.HashBin<Key,Value> bin) |
java.lang.String |
toString() |
void |
unload(Transaction tx)
unload indexes
|
public static final int CLOSED_STATE
public static final int OPEN_STATE
public static final int DEFAULT_BIN_CAPACITY
public static final int DEFAULT_MAXIMUM_BIN_CAPACITY
public static final int DEFAULT_MINIMUM_BIN_CAPACITY
public static final int DEFAULT_LOAD_FACTOR
public void load(Transaction tx) throws java.io.IOException
Index
public void unload(Transaction tx) throws java.io.IOException
Index
public Value get(Transaction tx, Key key) throws java.io.IOException
public boolean containsKey(Transaction tx, Key key) throws java.io.IOException
containsKey
in interface Index<Key,Value>
java.io.IOException
public Value put(Transaction tx, Key key, Value value) throws java.io.IOException
Index
public Value remove(Transaction tx, Key key) throws java.io.IOException
Index
public void clear(Transaction tx) throws java.io.IOException
Index
public java.util.Iterator<java.util.Map.Entry<Key,Value>> iterator(Transaction tx) throws java.io.IOException, java.lang.UnsupportedOperationException
public java.lang.String toString()
toString
in class java.lang.Object
public void store(Transaction tx, org.apache.kahadb.index.HashBin<Key,Value> bin) throws java.io.IOException
java.io.IOException
public Marshaller<Key> getKeyMarshaller()
public void setKeyMarshaller(Marshaller<Key> marshaller)
setKeyMarshaller
in interface Index<Key,Value>
marshaller
- public Marshaller<Value> getValueMarshaller()
public void setValueMarshaller(Marshaller<Value> valueMarshaller)
setValueMarshaller
in interface Index<Key,Value>
marshaller
- public int getBinCapacity()
public void setBinCapacity(int binCapacity)
binCapacity
- public boolean isTransient()
isTransient
in interface Index<Key,Value>
public int getLoadFactor()
public void setLoadFactor(int loadFactor)
loadFactor
- the loadFactor to setpublic int setMaximumBinCapacity()
public void setMaximumBinCapacity(int maximumCapacity)
maximumCapacity
- the maximumCapacity to setpublic int size(Transaction tx)
public int getActiveBins()
public long getBinPageId()
public PageFile getPageFile()
public int getBinsActive()
Copyright © 2005-2017. All Rights Reserved.