if (key.isUnique(Direction.IN)) {
Preconditions.checkArgument(Iterables.isEmpty(getVertices(key, value)),
"The given value [%s] is already used as a property and the property key [%s] is defined as graph-unique", value, key.getName());
}
}
StandardProperty prop = new StandardProperty(temporaryID.decrementAndGet(), key, (InternalVertex) vertex, value, ElementLifeCycle.New);
if (config.hasAssignIDsImmediately()) graph.assignID(prop);
connectRelation(prop);
return prop;
} finally {
uniqueLock.unlock();