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