public static class DeleteOption.Builder extends Object
| Modifier and Type | Method and Description |
|---|---|
DeleteOption |
build() |
DeleteOption.Builder |
isPrefix(boolean prefix)
Enables 'Delete' requests to delete all the keys by prefix.
|
DeleteOption.Builder |
withPrefix(ByteSequence prefix)
Deprecated.
Use
isPrefix(boolean) instead. |
DeleteOption.Builder |
withPrevKV(boolean prevKV)
Get the previous key/value pairs before deleting them.
|
DeleteOption.Builder |
withRange(ByteSequence endKey)
Set the end key of the delete request.
|
public DeleteOption.Builder withRange(ByteSequence endKey)
If end key is '\0', the range is all keys >= key.
If the end key is one bit larger than the given key, then it deletes all keys with the prefix (the given key).
If both key and end key are '\0', it deletes all keys.
endKey - end keypublic DeleteOption.Builder isPrefix(boolean prefix)
prefix - flag to delete all the keys by prefix@Deprecated public DeleteOption.Builder withPrefix(ByteSequence prefix)
isPrefix(boolean) instead.
You should pass the key that is passed into
KV.delete method
into this method as the given key.
prefix - the common prefix of all the keys that you want to deletepublic DeleteOption.Builder withPrevKV(boolean prevKV)
prevKV - flag to get previous key/value pairs before deleting them.public DeleteOption build()
Copyright © 2021. All rights reserved.