Class ArrayBasedRelationLockHolder
java.lang.Object
de.hybris.platform.catalog.jalo.synchronization.ArrayBasedRelationLockHolder
Provides locking facility by inspecting relation attributes to be written.
Generally a thread must wait for another one if it tries to write a attribute belonging to a relation type with a already locked attribute and common items involved. That may be common items within the set of referenced items or occurrence of the attribute owning item in the set of referenced items in the other attribute.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanlockRelationAttribute(int workerNumber, ArrayBasedRelationLockHolder.RelationAttributeInfo lock, boolean block) protected booleanmustWaitOn(ArrayBasedRelationLockHolder.RelationAttributeInfo info1, ArrayBasedRelationLockHolder.RelationAttributeInfo info2) voidreleaseAttributeLock(int workerNumber)
-
Constructor Details
-
ArrayBasedRelationLockHolder
public ArrayBasedRelationLockHolder(int maxWorkers)
-
-
Method Details
-
lockRelationAttribute
public boolean lockRelationAttribute(int workerNumber, ArrayBasedRelationLockHolder.RelationAttributeInfo lock, boolean block) -
releaseAttributeLock
public void releaseAttributeLock(int workerNumber) -
mustWaitOn
protected boolean mustWaitOn(ArrayBasedRelationLockHolder.RelationAttributeInfo info1, ArrayBasedRelationLockHolder.RelationAttributeInfo info2)
-