protected class TinkerGraph.TinkerKeyIndex<T extends com.tinkerpop.blueprints.impls.tg.TinkerElement> extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Map<Object,Set<T>>> |
index |
protected Class<T> |
indexClass |
protected String |
indexName |
| Constructor and Description |
|---|
TinkerGraph.TinkerKeyIndex(Class<T> indexClass,
TinkerGraph graph) |
| Modifier and Type | Method and Description |
|---|---|
void |
autoRemove(String key,
Object oldValue,
T element) |
void |
autoUpdate(String key,
Object newValue,
Object oldValue,
T element) |
long |
count(String key,
Object value)
Get a count of elements with a particular key/value pair.
|
void |
createKeyIndex(String key) |
void |
dropKeyIndex(String key) |
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.
|
Set<String> |
getIndexedKeys() |
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.
|
void |
removeElement(T element) |
String |
toString() |
protected final String indexName
public TinkerGraph.TinkerKeyIndex(Class<T> indexClass, TinkerGraph graph)
public void createKeyIndex(String key)
public void dropKeyIndex(String key)
public String getIndexName()
IndexgetIndexName in interface Index<T extends Element>public Class<T> getIndexClass()
IndexgetIndexClass in interface Index<T extends Element>public void put(String key, Object value, T element)
Indexpublic CloseableIterable<T> get(String key, Object value)
Indexpublic CloseableIterable<T> query(String key, Object query) throws UnsupportedOperationException
Indexquery in interface Index<T extends Element>key - the key of the indexed elementsquery - the query object for the indexed elements' keysUnsupportedOperationExceptionpublic long count(String key, Object value)
Indexpublic void remove(String key, Object value, T element)
Indexpublic void removeElement(T element)
Copyright © 2010-2014. All Rights Reserved.