public class MultiVertexCentricQueryBuilder extends BasicVertexCentricQueryBuilder<MultiVertexCentricQueryBuilder> implements JanusGraphMultiVertexQuery<MultiVertexCentricQueryBuilder>
JanusGraphMultiVertexQuery that extends BasicVertexCentricQueryBuilder
for all the query building and optimization and adds only the execution logic in
execute(org.janusgraph.graphdb.internal.RelationCategory, BasicVertexCentricQueryBuilder.ResultConstructor).
All other methods just prepare or transform that result set to fit the particular method semantics.
BasicVertexCentricQueryBuilder.CachedRelationConstructor, BasicVertexCentricQueryBuilder.RelationConstructor, BasicVertexCentricQueryBuilder.ResultConstructor<Q>, BasicVertexCentricQueryBuilder.VertexConstructor, BasicVertexCentricQueryBuilder.VertexIdConstructorprofiler, txadjacentVertex, constraints, dir, limit, orders, types| Constructor and Description |
|---|
MultiVertexCentricQueryBuilder(StandardJanusGraphTx tx) |
MultiVertexCentricQueryBuilder(StandardJanusGraphTx tx,
Integer initialVerticesCapacity) |
| Modifier and Type | Method and Description |
|---|---|
JanusGraphMultiVertexQuery |
addAllVertices(Collection<? extends org.apache.tinkerpop.gremlin.structure.Vertex> vertices)
Adds the given collection of vertices to the set of vertices against which to execute this query.
|
JanusGraphMultiVertexQuery |
addVertex(org.apache.tinkerpop.gremlin.structure.Vertex vertex)
Adds the given vertex to the set of vertices against which to execute this query.
|
Integer |
drop()
Drops all vertices that match this query
|
Map<JanusGraphVertex,Iterable<JanusGraphEdge>> |
edges()
Returns an iterable over all incident edges that match this query for each vertex
|
protected <Q> Map<JanusGraphVertex,Q> |
execute(RelationCategory returnType,
BasicVertexCentricQueryBuilder.ResultConstructor<Q> resultConstructor)
Constructs the BaseVertexCentricQuery through
BasicVertexCentricQueryBuilder.constructQuery(org.janusgraph.graphdb.internal.RelationCategory). |
Map<JanusGraphVertex,Iterable<? extends JanusGraphRelation>> |
executeImplicitKeyQuery() |
protected MultiVertexCentricQueryBuilder |
getThis() |
void |
preFetch()
Makes a call to properties to pre-fetch the properties into the vertex cache
|
Map<JanusGraphVertex,Iterable<JanusGraphVertexProperty>> |
properties()
Returns an iterable over all incident properties that match this query for each vertex
|
Map<JanusGraphVertex,Iterable<JanusGraphRelation>> |
relations()
Returns an iterable over all incident relations that match this query for each vertex
|
Map<JanusGraphVertex,VertexList> |
vertexIds()
Retrieves all vertices connected to each of the query's central vertices by edges
matching the conditions defined in this query.
|
Map<JanusGraphVertex,Iterable<JanusGraphVertex>> |
vertices()
Retrieves all vertices connected to each of the query's base vertices by edges
matching the conditions defined in this query.
|
all, allRequiredRepresentatives, constructQuery, constructQuery, constructQueryWithoutProfile, edges2VertexIds, edges2Vertices, executeImplicitKeyQuery, executeRelations, executeVertexIds, executeVertices, getVertex, hasAllCanonicalTypes, hasQueryOnlyGivenVertex, hasQueryOnlyLoaded, isPartitionedVertex, loadRelationsFromCache, noPartitionRestriction, profiler, queryOnlyGivenVertex, queryOnlyLoaded, system, useSimpleQueryProcessoradjacent, direction, getSingleType, has, has, has, hasNot, hasNot, hasSingleType, hasTypes, interval, isImplicitKeyQuery, keys, labels, limit, orderBy, type, types, typespublic MultiVertexCentricQueryBuilder(StandardJanusGraphTx tx)
public MultiVertexCentricQueryBuilder(StandardJanusGraphTx tx, Integer initialVerticesCapacity)
protected MultiVertexCentricQueryBuilder getThis()
getThis in class BaseVertexCentricQueryBuilder<MultiVertexCentricQueryBuilder>public JanusGraphMultiVertexQuery addVertex(org.apache.tinkerpop.gremlin.structure.Vertex vertex)
JanusGraphMultiVertexQueryaddVertex in interface JanusGraphMultiVertexQuery<MultiVertexCentricQueryBuilder>public JanusGraphMultiVertexQuery addAllVertices(Collection<? extends org.apache.tinkerpop.gremlin.structure.Vertex> vertices)
JanusGraphMultiVertexQueryaddAllVertices in interface JanusGraphMultiVertexQuery<MultiVertexCentricQueryBuilder>protected <Q> Map<JanusGraphVertex,Q> execute(RelationCategory returnType, BasicVertexCentricQueryBuilder.ResultConstructor<Q> resultConstructor)
BasicVertexCentricQueryBuilder.constructQuery(org.janusgraph.graphdb.internal.RelationCategory).
If the query asks for an implicit key, the resulting map is computed and returned directly.
If the query is empty, a map that maps each vertex to an empty list is returned.
Otherwise, the query is executed for all vertices through the transaction which will effectively
pre-load the return result sets into the associated CacheVertex or
don't do anything at all if the vertex is new (and hence no edges in the storage backend).
After that, a map is constructed that maps each vertex to the corresponding VertexCentricQuery and wrapped
into a QueryProcessor. Hence, upon iteration the query will be executed like any other VertexCentricQuery
with the performance difference that the SliceQueries will have already been preloaded and not further
calls to the storage backend are needed.returnType - public Map<JanusGraphVertex,Iterable<? extends JanusGraphRelation>> executeImplicitKeyQuery()
public Map<JanusGraphVertex,Iterable<JanusGraphEdge>> edges()
JanusGraphMultiVertexQueryedges in interface JanusGraphMultiVertexQuery<MultiVertexCentricQueryBuilder>public Map<JanusGraphVertex,Iterable<JanusGraphVertexProperty>> properties()
JanusGraphMultiVertexQueryproperties in interface JanusGraphMultiVertexQuery<MultiVertexCentricQueryBuilder>public void preFetch()
JanusGraphMultiVertexQuerypreFetch in interface JanusGraphMultiVertexQuery<MultiVertexCentricQueryBuilder>public Map<JanusGraphVertex,Iterable<JanusGraphRelation>> relations()
JanusGraphMultiVertexQueryrelations in interface JanusGraphMultiVertexQuery<MultiVertexCentricQueryBuilder>public Map<JanusGraphVertex,Iterable<JanusGraphVertex>> vertices()
JanusGraphMultiVertexQueryvertices in interface JanusGraphMultiVertexQuery<MultiVertexCentricQueryBuilder>public Map<JanusGraphVertex,VertexList> vertexIds()
JanusGraphMultiVertexQueryThe query engine will determine the most efficient way to retrieve the vertices that match this query.
vertexIds in interface JanusGraphMultiVertexQuery<MultiVertexCentricQueryBuilder>public Integer drop()
JanusGraphMultiVertexQuerydrop in interface JanusGraphMultiVertexQuery<MultiVertexCentricQueryBuilder>Copyright © 2012–2024. All rights reserved.