Class ReleaseLockOptions.ReleaseLockOptionsBuilder
- java.lang.Object
-
- com.amazonaws.services.dynamodbv2.ReleaseLockOptions.ReleaseLockOptionsBuilder
-
- Enclosing class:
- ReleaseLockOptions
public static class ReleaseLockOptions.ReleaseLockOptionsBuilder extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReleaseLockOptionsbuild()StringtoString()ReleaseLockOptions.ReleaseLockOptionsBuilderwithBestEffort(boolean bestEffort)Whether or not to ignoreAmazonClientExceptionwhen releasing the lock.ReleaseLockOptions.ReleaseLockOptionsBuilderwithData(ByteBuffer data)New data to persist to the lock (only used if deleteLock=false.) If the data is null, then the lock client will keep the data as-is and not change it.ReleaseLockOptions.ReleaseLockOptionsBuilderwithDeleteLock(boolean deleteLock)Whether or not to delete the lock when releasing it.
-
-
-
Method Detail
-
withDeleteLock
public ReleaseLockOptions.ReleaseLockOptionsBuilder withDeleteLock(boolean deleteLock)
Whether or not to delete the lock when releasing it. If set to false, the lock row will continue to be in DynamoDB, but it will be marked as released.- Parameters:
deleteLock- true to delete the lock when releasing, false otherwise- Returns:
- a reference to this builder for fluent method chaining
-
withBestEffort
public ReleaseLockOptions.ReleaseLockOptionsBuilder withBestEffort(boolean bestEffort)
Whether or not to ignoreAmazonClientExceptionwhen releasing the lock. If set to true, any exception when calling DynamoDB will be ignored and the clean up steps will continue, hence the lock item in DynamoDb might not be updated / deleted but will eventually expire.- Parameters:
bestEffort- true to ignoreAmazonClientExceptionwhen releasing, false otherwise- Returns:
- a reference to this builder for fluent method chaining
-
withData
public ReleaseLockOptions.ReleaseLockOptionsBuilder withData(ByteBuffer data)
New data to persist to the lock (only used if deleteLock=false.) If the data is null, then the lock client will keep the data as-is and not change it.- Parameters:
data- The data to persist when deleting the lock- Returns:
- a reference to this builder for fluent method chaining
-
build
public ReleaseLockOptions build()
-
-