public class PreloadedVertex extends CacheVertex
Modifier and Type | Class and Description |
---|---|
static interface |
PreloadedVertex.AccessCheck |
static interface |
PreloadedVertex.PropertyMixing |
Modifier and Type | Field and Description |
---|---|
static PreloadedVertex.AccessCheck |
CLOSEDSTAR_CHECK |
static PreloadedVertex.AccessCheck |
DEFAULT_CHECK |
static Retriever<SliceQuery,EntryList> |
EMPTY_RETRIEVER |
static PreloadedVertex.AccessCheck |
OPENSTAR_CHECK |
queryCache
Constructor and Description |
---|
PreloadedVertex(StandardJanusGraphTx tx,
Object id,
byte lifecycle) |
Modifier and Type | Method and Description |
---|---|
JanusGraphEdge |
addEdge(String s,
org.apache.tinkerpop.gremlin.structure.Vertex vertex,
Object... keyValues)
Creates a new edge incident on this vertex.
|
boolean |
addRelation(InternalRelation e)
Add a new relation to the vertex
|
void |
addToQueryCache(SliceQuery query,
EntryList entries) |
Iterator<org.apache.tinkerpop.gremlin.structure.Edge> |
edges(org.apache.tinkerpop.gremlin.structure.Direction direction,
String... edgeLabels) |
Iterable<InternalRelation> |
findAddedProperty(com.google.common.base.Predicate<InternalRelation> query) |
Iterable<InternalRelation> |
findPreviousRelation(long id) |
Iterable<InternalRelation> |
getAddedRelations(com.google.common.base.Predicate<InternalRelation> query)
Returns an iterable over all newly added relations incident on this vertex that match the given predicate
|
boolean |
hasAddedRelations()
Whether this vertex has added relations
|
boolean |
hasLoadedRelations(SliceQuery query)
Returns true if the results for the given query have already been loaded for this vertex and are locally cached.
|
boolean |
hasRemovedRelations()
Whether this vertex has removed relations
|
EntryList |
loadRelations(SliceQuery query,
Retriever<SliceQuery,EntryList> lookup)
Returns all relations that match the given query.
|
<V> Iterator<org.apache.tinkerpop.gremlin.structure.VertexProperty<V>> |
properties(String... keys) |
<V> JanusGraphVertexProperty<V> |
property(String key,
V value,
Object... keyValues) |
<V> JanusGraphVertexProperty<V> |
property(org.apache.tinkerpop.gremlin.structure.VertexProperty.Cardinality cardinality,
String key,
V value,
Object... keyValues) |
VertexCentricQueryBuilder |
query()
Starts a new
JanusGraphVertexQuery for this vertex. |
void |
remove()
Deletes this entity and any incident edges or properties from the graph.
|
void |
remove(Iterable<JanusGraphRelation> loadedRelations)
Remove a vertex with pre-loaded relations.
|
void |
removeRelation(InternalRelation e)
Deleted relation e from the adjacency list of this vertex and updates the state of the vertex to reflect
the modification.
|
void |
setAccessCheck(PreloadedVertex.AccessCheck accessCheck) |
void |
setPropertyMixing(PreloadedVertex.PropertyMixing mixin) |
getFromCache, getQueryCacheSize, refresh
getDuplicatedAddedRelation, getLifeCycle, updateLifeCycle, vertexLabel
getCompareId, getVertexLabelInternal, isModified, isTxOpen, it, label, toString, tx, valueOrNull, verifyAccess, vertices
clone, compare, compareTo, equals, hashCode, hasId, id, isInvisible, isLoaded, isNew, isRemoved, isTemporaryId, setId
finalize, getClass, notify, notifyAll, wait, wait, wait
property
graph, isInvisible, setId
public static final Retriever<SliceQuery,EntryList> EMPTY_RETRIEVER
public static final PreloadedVertex.AccessCheck DEFAULT_CHECK
public static final PreloadedVertex.AccessCheck CLOSEDSTAR_CHECK
public static final PreloadedVertex.AccessCheck OPENSTAR_CHECK
public PreloadedVertex(StandardJanusGraphTx tx, Object id, byte lifecycle)
public void setPropertyMixing(PreloadedVertex.PropertyMixing mixin)
public void setAccessCheck(PreloadedVertex.AccessCheck accessCheck)
public void addToQueryCache(SliceQuery query, EntryList entries)
addToQueryCache
in class CacheVertex
public Iterable<InternalRelation> getAddedRelations(com.google.common.base.Predicate<InternalRelation> query)
InternalVertex
getAddedRelations
in interface InternalVertex
getAddedRelations
in class StandardVertex
public Iterable<InternalRelation> findAddedProperty(com.google.common.base.Predicate<InternalRelation> query)
findAddedProperty
in interface InternalVertex
findAddedProperty
in class StandardVertex
public Iterable<InternalRelation> findPreviousRelation(long id)
findPreviousRelation
in interface InternalVertex
findPreviousRelation
in class StandardVertex
public VertexCentricQueryBuilder query()
JanusGraphVertex
JanusGraphVertexQuery
for this vertex.
Initializes and returns a new JanusGraphVertexQuery
based on this vertex.
query
in interface JanusGraphVertex
query
in interface InternalVertex
query
in class AbstractVertex
JanusGraphVertexQuery
public boolean hasLoadedRelations(SliceQuery query)
InternalVertex
hasLoadedRelations
in interface InternalVertex
hasLoadedRelations
in class CacheVertex
public boolean hasRemovedRelations()
InternalVertex
hasRemovedRelations
in interface InternalVertex
hasRemovedRelations
in class StandardVertex
public boolean hasAddedRelations()
InternalVertex
hasAddedRelations
in interface InternalVertex
hasAddedRelations
in class StandardVertex
public EntryList loadRelations(SliceQuery query, Retriever<SliceQuery,EntryList> lookup)
InternalVertex
Retriever
to retrieve the edges from backend storage.loadRelations
in interface InternalVertex
loadRelations
in class CacheVertex
public <V> JanusGraphVertexProperty<V> property(org.apache.tinkerpop.gremlin.structure.VertexProperty.Cardinality cardinality, String key, V value, Object... keyValues)
property
in interface org.apache.tinkerpop.gremlin.structure.Vertex
property
in interface JanusGraphVertex
property
in class AbstractVertex
public <V> JanusGraphVertexProperty<V> property(String key, V value, Object... keyValues)
property
in interface org.apache.tinkerpop.gremlin.structure.Vertex
property
in interface JanusGraphVertex
property
in class AbstractVertex
public <V> Iterator<org.apache.tinkerpop.gremlin.structure.VertexProperty<V>> properties(String... keys)
properties
in interface org.apache.tinkerpop.gremlin.structure.Element
properties
in interface org.apache.tinkerpop.gremlin.structure.Vertex
properties
in class StandardVertex
public JanusGraphEdge addEdge(String s, org.apache.tinkerpop.gremlin.structure.Vertex vertex, Object... keyValues)
JanusGraphVertex
Creates and returns a new JanusGraphEdge
of the specified label with this vertex being the outgoing vertex
and the given vertex being the incoming vertex.
Automatically creates the edge label if it does not exist and automatic creation of types is enabled. Otherwise,
this method with throw an IllegalArgumentException
.
addEdge
in interface org.apache.tinkerpop.gremlin.structure.Vertex
addEdge
in interface JanusGraphVertex
addEdge
in class AbstractVertex
s
- label of the edge to be createdvertex
- incoming vertex of the edge to be createdpublic Iterator<org.apache.tinkerpop.gremlin.structure.Edge> edges(org.apache.tinkerpop.gremlin.structure.Direction direction, String... edgeLabels)
edges
in interface org.apache.tinkerpop.gremlin.structure.Vertex
edges
in class AbstractVertex
public void remove()
JanusGraphElement
remove
in interface org.apache.tinkerpop.gremlin.structure.Element
remove
in interface JanusGraphElement
remove
in interface Removable
remove
in class StandardVertex
public void remove(Iterable<JanusGraphRelation> loadedRelations)
InternalVertex
remove
in interface InternalVertex
remove
in class StandardVertex
loadedRelations
- pre-loaded relations.public void removeRelation(InternalRelation e)
InternalVertex
removeRelation
in interface InternalVertex
removeRelation
in class StandardVertex
e
- JanusGraphRelation to be removedpublic boolean addRelation(InternalRelation e)
InternalVertex
addRelation
in interface InternalVertex
addRelation
in class StandardVertex
Copyright © 2012–2024. All rights reserved.