@Override
public void softDeleteVertex(Vertex vertex, Long timestamp, Authorizations authorizations) {
if (!((InMemoryVertex) vertex).canRead(authorizations)) {
return;
}
if (timestamp == null) {
timestamp = IncreasingTime.currentTimeMillis();
}
for (Property property : vertex.getProperties()) {
vertex.softDeleteProperty(property.getKey(), property.getName(), property.getVisibility(), authorizations);
}
List<Edge> edgesToSoftDelete = IterableUtils.toList(vertex.getEdges(Direction.BOTH, authorizations));
for (Edge edgeToSoftDelete : edgesToSoftDelete) {
softDeleteEdge(edgeToSoftDelete, timestamp, authorizations);
}
this.vertices.getTableElement(vertex.getId()).appendSoftDeleteMutation(timestamp);
getSearchIndex().deleteElement(this, vertex, authorizations);
if (hasEventListeners()) {
fireGraphEvent(new SoftDeleteVertexEvent(this, vertex));
}
}