Class ArrayBasedRelationLockHolder
- java.lang.Object
-
- de.hybris.platform.catalog.jalo.synchronization.ArrayBasedRelationLockHolder
-
public class ArrayBasedRelationLockHolder extends java.lang.ObjectProvides 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 Classes Modifier and Type Class Description static interfaceArrayBasedRelationLockHolder.RelationAttributeInfo
-
Constructor Summary
Constructors Constructor Description ArrayBasedRelationLockHolder(int maxWorkers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanlockRelationAttribute(int workerNumber, ArrayBasedRelationLockHolder.RelationAttributeInfo lock, boolean block)protected booleanmustWaitOn(ArrayBasedRelationLockHolder.RelationAttributeInfo info1, ArrayBasedRelationLockHolder.RelationAttributeInfo info2)voidreleaseAttributeLock(int workerNumber)
-
-
-
Method Detail
-
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)
-
-