@Override public TitanGraphIndex getGraphIndex(String name) { IndexType index = getGraphIndexDirect(name, transaction); return index == null ? null : new TitanGraphIndexWrapper(index); }
@Override public String toString() { return name(); } }
@Override public boolean containsGraphIndex(String name) { return getGraphIndex(name) != null; }
private TitanIndex retrieve(ManagementSystem mgmt) { if (relationTypeName == null) return mgmt.getGraphIndex(indexName); else return mgmt.getRelationIndex(mgmt.getRelationType(relationTypeName), indexName); }
@Override public RelationTypeIndex buildEdgeIndex(EdgeLabel label, String name, Direction direction, PropertyKey... sortKeys) { return buildRelationTypeIndex(label, name, direction, Order.ASC, sortKeys); }
@Override public synchronized String get(String path) { ensureOpen(); return userConfig.get(path); }
@Override public boolean containsRelationIndex(RelationType type, String name) { return getRelationIndex(type, name) != null; }
@Override public TitanManagement.IndexBuilder buildIndex(String indexName, Class<? extends Element> elementType) { return new IndexBuilder(indexName, ElementCategory.getByClazz(elementType)); }
@Override public TitanManagement openManagement() { return new ManagementSystem(this,backend.getGlobalSystemConfig(),backend.getSystemMgmtLog(), mgmtLogger, schemaCache); }
/** * Set the target index status. {@link #call()} will repeatedly * poll the graph passed into this instance during construction to * see whether the index (also passed in during construction) has * the supplied status. * * @param status * @return */ public S status(SchemaStatus status) { this.status = status; return self(); }
@Override public String toString() { return name(); }
/** * Returns a {@link GraphIndexStatusWatcher} configured to watch * {@code graphIndexName} through graph {@code g}. * <p/> * This method just instantiates an object. * Invoke {@link GraphIndexStatusWatcher#call()} to wait. * * @param g the graph through which to read index information * @param graphIndexName the name of a graph index to watch * @return */ public static GraphIndexStatusWatcher awaitGraphIndexStatus(TitanGraph g, String graphIndexName) { return new GraphIndexStatusWatcher(g, graphIndexName); }
public Consumer<ScanMetrics> getIndexJobFinisher() { return getIndexJobFinisher(null, null); }
/** * Returns a {@link RelationIndexStatusWatcher} configured to watch the index specified by * {@code relationIndexName} and {@code relationIndexType} through graph {@code g}. * <p/> * This method just instantiates an object. * Invoke {@link RelationIndexStatusWatcher#call()} to wait. * * @param g the graph through which to read index information * @param relationIndexName the name of the relation index to watch * @param relationTypeName the type on the relation index to watch * @return */ public static RelationIndexStatusWatcher awaitRelationIndexStatus(TitanGraph g, String relationIndexName, String relationTypeName) { return new RelationIndexStatusWatcher(g, relationIndexName, relationTypeName); }
@Override public IndexJobFuture getIndexJobStatus(TitanIndex index) { IndexIdentifier indexId = new IndexIdentifier(index); return graph.getBackend().getScanJobStatus(indexId); }
@Override public RelationTypeIndex buildPropertyIndex(PropertyKey key, String name, PropertyKey... sortKeys) { return buildRelationTypeIndex(key, name, Direction.OUT, Order.ASC, sortKeys); }
@Override public synchronized TitanConfiguration set(String path, Object value) { ensureOpen(); return userConfig.set(path, value); } }
/** * Set the index information polling interval. {@link #call()} waits * at least this long between repeated attempts to read schema information * and determine whether the index has reached its target state. */ public S pollInterval(long poll, TemporalUnit pollUnit) { Preconditions.checkArgument(0 <= poll); this.poll = Duration.of(poll, pollUnit); return self(); }
@Override public RelationTypeIndex buildEdgeIndex(EdgeLabel label, String name, Direction direction, org.apache.tinkerpop.gremlin.process.traversal.Order sortOrder, PropertyKey... sortKeys) { return buildRelationTypeIndex(label, name, direction, Order.convert(sortOrder), sortKeys); }
@Override public RelationTypeIndex buildPropertyIndex(PropertyKey key, String name, org.apache.tinkerpop.gremlin.process.traversal.Order sortOrder, PropertyKey... sortKeys) { return buildRelationTypeIndex(key, name, Direction.OUT, Order.convert(sortOrder), sortKeys); }