Class PromotedToLock.Builder
- java.lang.Object
-
- org.apache.curator.framework.recipes.atomic.PromotedToLock.Builder
-
- Enclosing class:
- PromotedToLock
public static class PromotedToLock.Builder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PromotedToLockbuild()Build the argument blockPromotedToLock.BuilderlockPath(java.lang.String path)Set the path for the mutex lock (required)PromotedToLock.BuilderretryPolicy(org.apache.curator.RetryPolicy retryPolicy)Set the retry policy to use when an operation does not succeedPromotedToLock.Buildertimeout(long maxLockTime, java.util.concurrent.TimeUnit maxLockTimeUnit)Set the timeout to use when locking (optional)
-
-
-
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- timemaxLockTimeUnit- unit- Returns:
- this
-
-