Class CompoundLock

java.lang.Object
org.aksw.commons.lock.LockBase
org.aksw.commons.lock.CompoundLock
All Implemented Interfaces:
Lock

public class CompoundLock extends LockBase
A lock that is made up of multiple locks. For tryLock(long, TimeUnit) to succeed this method must succeed for all child locks. On failure any acquired locks are unlocked again.
Author:
raven
  • Field Details

    • locks

      protected List<? extends Lock> locks
    • heldLocks

      protected int heldLocks
  • Constructor Details

    • CompoundLock

      public CompoundLock(List<? extends Lock> locks)
  • Method Details