Class AbstractTinkerIndex<T extends Element>
- java.lang.Object
- 
- org.apache.tinkerpop.gremlin.tinkergraph.structure.AbstractTinkerIndex<T>
 
- 
- Type Parameters:
- T- type of- Elementto be indexed
 
 public abstract class AbstractTinkerIndex<T extends Element> extends Object Storage for indexes that can be used by different implementations ofAbstractTinkerGraph.- Author:
- Valentyn Kahamlyk
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classAbstractTinkerIndex.IndexedNull
 - 
Field SummaryFields Modifier and Type Field Description protected AbstractTinkerGraphgraphprotected Class<T>indexClassprotected Set<String>indexedKeys
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedAbstractTinkerIndex(AbstractTinkerGraph graph, Class<T> indexClass)
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidautoUpdate(String key, Object newValue, Object oldValue, T element)Update index for single property of element.abstract longcount(String key, Object value)Get count of elements which have a property with the desired value.abstract voidcreateKeyIndex(String key)Create new indexabstract voiddropKeyIndex(String key)Drop indexabstract List<T>get(String key, Object value)Get list of elements which have a property with the desired value.Set<String>getIndexedKeys()Get all index keys for Graphstatic Objectindexable(Object obj)Provides a way for an index to have anullvalue asConcurrentHashMapwill not allow anullkey.abstract voidremove(String key, Object value, T element)Remove elements with some property from index.abstract voidremoveElement(T element)Remove elements from all indexes.
 
- 
- 
- 
Constructor Detail- 
AbstractTinkerIndexprotected AbstractTinkerIndex(AbstractTinkerGraph graph, Class<T> indexClass) 
 
- 
 - 
Method Detail- 
getpublic abstract List<T> get(String key, Object value) Get list of elements which have a property with the desired value.- Parameters:
- key- property key
- value- property value
- Returns:
- list of elements
 
 - 
countpublic abstract long count(String key, Object value) Get count of elements which have a property with the desired value.- Parameters:
- key- property key
- value- property value
- Returns:
- count of elements
 
 - 
removepublic abstract void remove(String key, Object value, T element) Remove elements with some property from index. Convenient to use when removed only one property of an element.- Parameters:
- key- property key
- value- property value
- element- changed element
 
 - 
removeElementpublic abstract void removeElement(T element) Remove elements from all indexes. Can be used when element was deleted or has changed more than 1 property.- Parameters:
- element- changed element
 
 - 
autoUpdatepublic abstract void autoUpdate(String key, Object newValue, Object oldValue, T element) Update index for single property of element.- Parameters:
- key- property key
- newValue- updated value of property
- oldValue- optional value of property before update
- element- changed element
 
 - 
createKeyIndexpublic abstract void createKeyIndex(String key) Create new index- Parameters:
- key- property key
 
 - 
dropKeyIndexpublic abstract void dropKeyIndex(String key) Drop index- Parameters:
- key- property key
 
 - 
getIndexedKeyspublic Set<String> getIndexedKeys() Get all index keys for Graph- Returns:
- set of index keys
 
 
- 
 
-