Interface Index<Key,Value>
- All Known Implementing Classes:
BTreeIndex,HashIndex,ListIndex,PListImpl
public interface Index<Key,Value>
Simpler than a Map
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear(Transaction tx) clear the indexbooleancontainsKey(Transaction tx, Key key) get(Transaction tx, Key key) booleaniterator(Transaction tx) voidload(Transaction tx) load indexesput(Transaction tx, Key key, Value entry) store the key, itemremove(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 Details
-
setKeyMarshaller
Set the marshaller for key objects- Parameters:
marshaller-
-
setValueMarshaller
Set the marshaller for key objects- Parameters:
marshaller-
-
load
load indexes- Throws:
IOException
-
unload
unload indexes- Throws:
IOException
-
clear
clear the index- Throws:
IOException
-
containsKey
- Parameters:
key-- Returns:
- true if it contains the key
- Throws:
IOException
-
remove
remove the index key- Parameters:
key-- Returns:
- StoreEntry removed
- Throws:
IOException
-
put
store the key, item- Parameters:
key-entry-- Throws:
IOException
-
get
- 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
-