@Override public void softDeleteEdge(Edge edge, Long timestamp, Authorizations authorizations) { checkNotNull(edge, "Edge cannot be null"); if (!((InMemoryEdge) edge).canRead(authorizations)) { return; } if (timestamp == null) { timestamp = IncreasingTime.currentTimeMillis(); } this.edges.getTableElement(edge.getId()).appendSoftDeleteMutation(timestamp); getSearchIndex().deleteElement(this, edge, authorizations); if (hasEventListeners()) { fireGraphEvent(new SoftDeleteEdgeEvent(this, edge)); } }
@Override public void softDeleteEdge(Edge edge, Long timestamp, Authorizations authorizations) { checkNotNull(edge); Span trace = Trace.start("softDeleteEdge"); trace.data("edgeId", edge.getId()); try { if (timestamp == null) { timestamp = IncreasingTime.currentTimeMillis(); } getSearchIndex().deleteElement(this, edge, authorizations); ColumnVisibility visibility = visibilityToAccumuloVisibility(edge.getVisibility()); Mutation outMutation = new Mutation(edge.getVertexId(Direction.OUT)); outMutation.put(AccumuloVertex.CF_OUT_EDGE_SOFT_DELETE, new Text(edge.getId()), visibility, timestamp, AccumuloElement.SOFT_DELETE_VALUE); Mutation inMutation = new Mutation(edge.getVertexId(Direction.IN)); inMutation.put(AccumuloVertex.CF_IN_EDGE_SOFT_DELETE, new Text(edge.getId()), visibility, timestamp, AccumuloElement.SOFT_DELETE_VALUE); addMutations(VertexiumObjectType.VERTEX, outMutation, inMutation); // Soft deletes everything else related to edge. addMutations(VertexiumObjectType.EDGE, getSoftDeleteRowMutation(edge.getId(), timestamp)); if (hasEventListeners()) { queueEvent(new SoftDeleteEdgeEvent(this, edge)); } } finally { trace.stop(); } }
@Override public void softDeleteEdge(Edge edge, Long timestamp, Authorizations authorizations) { checkNotNull(edge); Span trace = Trace.start("softDeleteEdge"); trace.data("edgeId", edge.getId()); try { if (timestamp == null) { timestamp = IncreasingTime.currentTimeMillis(); } getSearchIndex().deleteElement(this, edge, authorizations); ColumnVisibility visibility = visibilityToAccumuloVisibility(edge.getVisibility()); Mutation outMutation = new Mutation(edge.getVertexId(Direction.OUT)); outMutation.put(AccumuloVertex.CF_OUT_EDGE_SOFT_DELETE, new Text(edge.getId()), visibility, timestamp, AccumuloElement.SOFT_DELETE_VALUE); Mutation inMutation = new Mutation(edge.getVertexId(Direction.IN)); inMutation.put(AccumuloVertex.CF_IN_EDGE_SOFT_DELETE, new Text(edge.getId()), visibility, timestamp, AccumuloElement.SOFT_DELETE_VALUE); addMutations(VertexiumObjectType.VERTEX, outMutation, inMutation); // Soft deletes everything else related to edge. addMutations(VertexiumObjectType.EDGE, getSoftDeleteRowMutation(edge.getId(), timestamp)); if (hasEventListeners()) { queueEvent(new SoftDeleteEdgeEvent(this, edge)); } } finally { trace.stop(); } }
@Override public int hashCode() { return getEdge().hashCode(); }
@Override public int hashCode() { return getEdge().hashCode(); }