Interface Index<Key,Value>
-
- All Known Implementing Classes:
BTreeIndex,HashIndex,ListIndex,PListImpl
public interface Index<Key,Value>Simpler than a Map
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclear(Transaction tx)clear the indexbooleancontainsKey(Transaction tx, Key key)Valueget(Transaction tx, Key key)booleanisTransient()Iterator<Map.Entry<Key,Value>>iterator(Transaction tx)voidload(Transaction tx)load indexesValueput(Transaction tx, Key key, Value entry)store the key, itemValueremove(Transaction tx, Key key)remove the index keyvoidsetKeyMarshaller(Marshaller<Key> marshaller)Set the marshaller for key objectsvoidsetValueMarshaller(Marshaller<Value> marshaller)Set the marshaller for key objectsvoidunload(Transaction tx)unload indexes
-
-
-
Method Detail
-
setKeyMarshaller
void setKeyMarshaller(Marshaller<Key> marshaller)
Set the marshaller for key objects- Parameters:
marshaller-
-
setValueMarshaller
void setValueMarshaller(Marshaller<Value> marshaller)
Set the marshaller for key objects- Parameters:
marshaller-
-
load
void load(Transaction tx) throws IOException
load indexes- Throws:
IOException
-
unload
void unload(Transaction tx) throws IOException
unload indexes- Throws:
IOException
-
clear
void clear(Transaction tx) throws IOException
clear the index- Throws:
IOException
-
containsKey
boolean containsKey(Transaction tx, Key key) throws IOException
- Parameters:
key-- Returns:
- true if it contains the key
- Throws:
IOException
-
remove
Value remove(Transaction tx, Key key) throws IOException
remove the index key- Parameters:
key-- Returns:
- StoreEntry removed
- Throws:
IOException
-
put
Value put(Transaction tx, Key key, Value entry) throws IOException
store the key, item- Parameters:
key-entry-- Throws:
IOException
-
get
Value get(Transaction tx, Key key) throws IOException
- Parameters:
key-- Returns:
- the entry
- Throws:
IOException
-
isTransient
boolean isTransient()
- Returns:
- true if the index is transient
-
iterator
Iterator<Map.Entry<Key,Value>> iterator(Transaction tx) throws IOException, UnsupportedOperationException
- Parameters:
tx-- Returns:
- Throws:
IOExceptionUnsupportedOperationException
-
-