Class PromotedToLock.Builder

java.lang.Object
org.apache.curator.framework.recipes.atomic.PromotedToLock.Builder
Enclosing class:
PromotedToLock

public static class PromotedToLock.Builder extends Object
  • Method Details

    • build

      public PromotedToLock build()
      Build the argument block
      Returns:
      new block
    • lockPath

      public PromotedToLock.Builder lockPath(String path)
      Set the path for the mutex lock (required)
      Parameters:
      path - path
      Returns:
      this
    • retryPolicy

      public PromotedToLock.Builder retryPolicy(RetryPolicy retryPolicy)
      Set the retry policy to use when an operation does not succeed
      Parameters:
      retryPolicy - new policy
      Returns:
      this
    • timeout

      public PromotedToLock.Builder timeout(long maxLockTime, TimeUnit maxLockTimeUnit)
      Set the timeout to use when locking (optional)
      Parameters:
      maxLockTime - time
      maxLockTimeUnit - unit
      Returns:
      this