public interface JanusGraphIndex extends Index
JanusGraphManagement.buildIndex(String, Class)
.
This interface allows introspecting an existing graph index. Existing graph indexes can be retrieved via
JanusGraphManagement.getGraphIndex(String)
or JanusGraphManagement.getGraphIndexes(Class)
.
Modifier and Type | Method and Description |
---|---|
String |
getBackingIndex()
Returns the name of the backing index.
|
PropertyKey[] |
getFieldKeys()
Returns the indexed keys of this index.
|
Class<? extends org.apache.tinkerpop.gremlin.structure.Element> |
getIndexedElement()
Returns which element type is being indexed by this index (vertex, edge, or property)
|
SchemaStatus |
getIndexStatus(PropertyKey key)
Returns the status of this index with respect to the provided
PropertyKey . |
Parameter[] |
getParametersFor(PropertyKey key)
Returns the parameters associated with an indexed key of this index.
|
JanusGraphSchemaType |
getSchemaTypeConstraint() |
default Object |
id()
Returns a unique identifier for this entity.
|
boolean |
isCompositeIndex()
Whether this is a composite index
|
boolean |
isMixedIndex()
Whether this is a mixed index
|
boolean |
isUnique()
Whether this is a unique index, i.e.
|
long |
longId()
Unique identifier for this entity.
|
String |
name()
Returns the name of the index
|
default Object id()
The unique identifier may only be set when the transaction in which entity is created commits. Some entities are never assigned a unique identifier if they depend on a parent entity.
JanusGraph allocates blocks of identifiers and automatically assigns identifiers to elements
automatically be default. This behavior can be partially overridden by setting
GraphDatabaseConfiguration.ALLOW_SETTING_VERTEX_ID
IllegalStateException
- if the entity does not (yet) have a unique identifierlong longId()
id()
for the permanent id.String name()
name
in interface Namifiable
String getBackingIndex()
Class<? extends org.apache.tinkerpop.gremlin.structure.Element> getIndexedElement()
PropertyKey[] getFieldKeys()
Parameter[] getParametersFor(PropertyKey key)
key
- boolean isUnique()
SchemaStatus getIndexStatus(PropertyKey key)
PropertyKey
.
For composite indexes, the key is ignored and the status of the index as a whole is returned.
For mixed indexes, the status of that particular key within the index is returned.boolean isCompositeIndex()
boolean isMixedIndex()
JanusGraphSchemaType getSchemaTypeConstraint()
Copyright © 2012–2024. All rights reserved.