Class MultiplePathsLock

java.lang.Object
com.yahoo.vespa.curator.MultiplePathsLock
All Implemented Interfaces:
com.yahoo.transaction.Mutex, AutoCloseable

public class MultiplePathsLock extends Object implements com.yahoo.transaction.Mutex
Class that holds two locks, originally used for transitioning from one lock to another, where you need to hold both the old lock and the new lock in the transition period. Locks are acquired in constructor.
Author:
hmusum
  • Constructor Details

    • MultiplePathsLock

      public MultiplePathsLock(Lock... locks)
      Wrapped locks, in acquisition order.
  • Method Details

    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface com.yahoo.transaction.Mutex