public interface Index<T extends Element>
| Modifier and Type | Method and Description |
|---|---|
long |
count(String key,
Object value)
Get a count of elements with a particular key/value pair.
|
CloseableIterable<T> |
get(String key,
Object value)
Get all elements that are indexed by the provided key/value.
|
Class<T> |
getIndexClass()
Get the class that this index is indexing.
|
String |
getIndexName()
Get the name of the index.
|
void |
put(String key,
Object value,
T element)
Index an element by a key and a value.
|
CloseableIterable<T> |
query(String key,
Object query)
Get all the elements that are indexed by the provided key and specified query object.
|
void |
remove(String key,
Object value,
T element)
Remove an element indexed by a particular key/value.
|
String getIndexName()
Class<T> getIndexClass()
void put(String key, Object value, T element)
key - the key to index the element byvalue - the value to index the element byelement - the element to indexCloseableIterable<T> get(String key, Object value)
key - the key of the indexed elementsvalue - the value of the indexed elementsCloseableIterable<T> query(String key, Object query)
key - the key of the indexed elementsquery - the query object for the indexed elements' keyslong count(String key, Object value)
key - denoting the sub-index to searchvalue - the value to search forCopyright © 2010-2014. All Rights Reserved.