use of org.janusgraph.graphdb.util.VertexCentricEdgeIterable in project janusgraph by JanusGraph.
the class StandardJanusGraphTx method getEdges.
@Override
public Iterable<JanusGraphEdge> getEdges(RelationIdentifier... ids) {
verifyOpen();
if (ids == null || ids.length == 0)
return new VertexCentricEdgeIterable(getInternalVertices(), RelationCategory.EDGE);
if (null != config.getGroupName()) {
MetricManager.INSTANCE.getCounter(config.getGroupName(), "db", "getEdgesByID").inc();
}
List<JanusGraphEdge> result = new ArrayList<>(ids.length);
for (RelationIdentifier id : ids) {
if (id == null)
continue;
JanusGraphEdge edge = id.findEdge(this);
if (edge != null && !edge.isRemoved())
result.add(edge);
}
return result;
}
Aggregations