io.etcd.jetcd.options

## Class DeleteOption.Builder

- java.lang.Object
- - io.etcd.jetcd.options.DeleteOption.Builder

Enclosing class:
  DeleteOption

    public static class DeleteOption.Builder
    extends Object

### Method Summary

All Methods Instance Methods Concrete Methods
`DeleteOption` `build()`
`DeleteOption.Builder` `withPrefix(ByteSequence prefix)` Enables 'Delete' requests to delete all the keys with matching prefix.
`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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### withRange

    public DeleteOption.Builder withRange(ByteSequence endKey)

Set the end key of the delete request. If it is set, the delete request will delete the keys from key to endKey (exclusive).

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.

Parameters:
  `endKey` - end key
Returns:
  builder

#### withPrefix

    public DeleteOption.Builder withPrefix(ByteSequence prefix)

Enables 'Delete' requests to delete all the keys with matching prefix.

You should pass the key that is passed into `KV.delete` method into this method as the given key.

Parameters:
  `prefix` - the common prefix of all the keys that you want to delete
Returns:
  builder

#### withPrevKV

    public DeleteOption.Builder withPrevKV(boolean prevKV)

Get the previous key/value pairs before deleting them.

Parameters:
  `prevKV` - flag to get previous key/value pairs before deleting them.
Returns:
  builder

#### build

    public DeleteOption build()