public interface IndexMgr extends Serializable
#addIndex(String, Class, Class).| Modifier and Type | Method and Description |
|---|---|
void |
clearIndex(String indexId)
Removes all entries contained in the index with the passed identifier
|
boolean |
containsIndex(String indexId)
Checks if an index with the passed identifier is registered.
|
<K> boolean |
containsKey(String indexId,
K key)
Returns whether the index having the passed identifier contains the
passed key.
|
<K,V> void |
createIndex(String indexId,
Class<K> keyType,
Class<V> valueType)
Creates a new index which could be accessed via the passed identifier.
|
<K,V> void |
createIndex(String indexId,
Class<K> keyType,
Class<V> valueType,
int expectedKeys,
int expectedValuesPerKey)
Creates a new index which could be accessed via the passed identifier.
|
<K,V> V |
get(String indexId,
K key)
Returns the value corresponding to the passed key, which is contained in
the index with the passed identifier.
|
<K,V> List<V> |
getAll(String indexId,
K key)
Returns the set of values corresponding to the passed key, which is
contained in the index with the passed identifier.
|
<K,V> boolean |
put(String indexId,
K key,
V value)
Adds a new value to the index having the passed identifier under the
passed key.
|
<K,V> boolean |
putAll(String indexId,
K key,
Collection<V> values)
Adds a collection of values to the index having the passed identifier
under the passed key.
|
<K> boolean |
remove(String indexId,
K key)
Removes the value or collection of values corresponding to the passed key
contained in the index having the passed identifier.
|
<K,V> boolean |
remove(String indexId,
K key,
V value)
Removes the passed value corresponding to the passed key contained in the
index having the passed identifier.
|
void |
removeAll()
Removes all index from the index manager.
|
boolean |
removeIndex(String indexId)
Removes the index with the passed identifier.
|
<V> boolean |
removeValue(String indexId,
V value)
Removes the passed value from the indexes having the passed identifier.
|
<V> boolean |
removeValue(V value)
Removes the passed value from all registered indexes.
|
<K,V> void createIndex(String indexId, Class<K> keyType, Class<V> valueType)
K - V - indexId - identifier to access the index or its elementskeyType - type of the keys in the indexvalueType - type of the values in the index<K,V> void createIndex(String indexId, Class<K> keyType, Class<V> valueType, int expectedKeys, int expectedValuesPerKey)
K - V - indexId - identifier to access the index or its elementskeyType - type of the keys in the indexvalueType - type of the values in the indexexpectedKeys - number of expected keys of the index, this parameter is used
for initialization optimization. -1 means no expected sizeexpectedValuesPerKey - number of expected values per key of the index, this parameter
is used for initialization optimization.boolean containsIndex(String indexId)
indexId - identifier of the indexboolean removeIndex(String indexId)
indexId - identifier of the indexvoid clearIndex(String indexId)
indexId - identifier of the indexvoid removeAll()
<K,V> boolean put(String indexId, K key, V value)
K - V - indexId - identifier of the indexkey - the key to access the passed valuevalue - the value to be added to the index<K,V> boolean putAll(String indexId, K key, Collection<V> values)
K - V - indexId - identifier of the indexkey - the key to access the passed valuevalues - the values to be added to the index<K,V> V get(String indexId, K key)
K - V - indexId - identifier of the indexkey - corresponding key to the returned value<K,V> List<V> getAll(String indexId, K key)
K - V - indexId - identifier of the indexkey - corresponding key to the returned set of values<K> boolean remove(String indexId, K key)
remove(String, Object, Object).K - indexId - identifier of the indexkey - key corresponding to the value or values to be removed<K,V> boolean remove(String indexId, K key, V value)
K - V - indexId - identifier of the indexkey - key corresponding to the value to be removedvalue - <K> boolean containsKey(String indexId, K key)
K - indexId - identifier of the indexkey - key to be searched for<V> boolean removeValue(V value)
V - value - the value to be removed<V> boolean removeValue(String indexId, V value)
V - indexId - value - the value to be removedCopyright © 2009–2019 Humboldt-Universität zu Berlin, INRIA. All rights reserved.