public class IndexMgrImpl extends Object implements IndexMgr
| Constructor and Description |
|---|
IndexMgrImpl() |
IndexMgrImpl(boolean threadSafe) |
| 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 element)
Removes the passed value from the indexes having the passed identifier.
|
<V> boolean |
removeValue(V element)
Removes the given element from all indexes.
|
String |
toString() |
public IndexMgrImpl()
public IndexMgrImpl(boolean threadSafe)
public <K,V> void createIndex(String indexId, Class<K> keyType, Class<V> valueType)
createIndex in interface IndexMgrindexId - identifier to access the index or its elementskeyType - type of the keys in the indexvalueType - type of the values in the indexpublic <K,V> void createIndex(String indexId, Class<K> keyType, Class<V> valueType, int expectedKeys, int expectedValuesPerKey)
createIndex in interface IndexMgrindexId - 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.public boolean containsIndex(String indexId)
containsIndex in interface IndexMgrindexId - identifier of the indexpublic <K,V> boolean put(String indexId, K key, V value)
public <K,V> boolean putAll(String indexId, K key, Collection<V> values)
public <K,V> V get(String indexId, K key)
public <K,V> List<V> getAll(String indexId, K key)
public <K> boolean containsKey(String indexId, K key)
containsKey in interface IndexMgrindexId - identifier of the indexkey - key to be searched forpublic <K> boolean remove(String indexId, K key)
IndexMgr.remove(String, Object, Object).public <K,V> boolean remove(String indexId, K key, V value)
public boolean removeIndex(String indexId)
removeIndex in interface IndexMgrindexId - identifier of the indexpublic void clearIndex(String indexId)
clearIndex in interface IndexMgrindexId - identifier of the indexpublic void removeAll()
public <V> boolean removeValue(V element)
removeValue in interface IndexMgrelement - - the element which shall be removedpublic <V> boolean removeValue(String indexId, V element)
removeValue in interface IndexMgrelement - the value to be removedCopyright © 2009–2016 Humboldt-Universität zu Berlin, INRIA. All rights reserved.