Class PromotedToLock.Builder

  • Enclosing class:
    PromotedToLock

    public static class PromotedToLock.Builder
    extends java.lang.Object
    • Method Detail

      • build

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

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

        public PromotedToLock.Builder retryPolicy​(org.apache.curator.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,
                                              java.util.concurrent.TimeUnit maxLockTimeUnit)
        Set the timeout to use when locking (optional)
        Parameters:
        maxLockTime - time
        maxLockTimeUnit - unit
        Returns:
        this