Java Code Examples for com.thinkaurelius.titan.graphdb.internal.InternalRelationType#getConsistencyModifier()
The following examples show how to use
com.thinkaurelius.titan.graphdb.internal.InternalRelationType#getConsistencyModifier() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MizoTitanRelationType.java From mizo with Apache License 2.0 | 6 votes |
public MizoTitanRelationType(InternalRelationType relationType) { status = relationType.getStatus(); sortKey = relationType.getSortKey(); name = relationType.name(); id = relationType.longId(); isInvisibleType = relationType.isInvisibleType(); signature = relationType.getSignature(); sortOrder = relationType.getSortOrder(); multiplicity = relationType.multiplicity(); consistencyModifier = relationType.getConsistencyModifier(); ttl = relationType.getTTL(); isPropertyKey = relationType.isPropertyKey(); isEdgeLabel = relationType.isEdgeLabel(); if (relationType instanceof PropertyKey) { dataType = ((PropertyKey)relationType).dataType(); cardinality = ((PropertyKey)relationType).cardinality(); } else { dataType = null; cardinality = null; } }
Example 2
Source File: StandardTitanGraph.java From titan1withtp3.1 with Apache License 2.0 | 4 votes |
public static boolean acquireLock(InternalRelation relation, int pos, boolean acquireLocksConfig) { InternalRelationType type = (InternalRelationType)relation.getType(); return acquireLocksConfig && type.getConsistencyModifier()== ConsistencyModifier.LOCK && ( type.multiplicity().isUnique(EdgeDirection.fromPosition(pos)) || pos==0 && type.multiplicity()== Multiplicity.SIMPLE); }