if (label.isUnique(Direction.IN)) {
Preconditions.checkArgument(Iterables.isEmpty(query(inVertex).includeHidden().type(label).direction(Direction.IN).titanEdges()),
"An edge with the given type already exists on the in-vertex and the label [%s] is in-unique", label.getName());
}
}
StandardEdge edge = new StandardEdge(temporaryID.decrementAndGet(), label, (InternalVertex) outVertex, (InternalVertex) inVertex, ElementLifeCycle.New);
if (config.hasAssignIDsImmediately()) graph.assignID(edge);
connectRelation(edge);
return edge;
} finally {
uniqueLock.unlock();