io.etcd.jetcd.options

## Class WatchOption.Builder

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

Enclosing class:
  WatchOption

    public static class WatchOption.Builder
    extends Object

### Method Summary

All Methods Instance Methods Concrete Methods
`WatchOption` `build()`
`WatchOption.Builder` `withNoDelete(boolean noDelete)` filter out delete event in server side.
`WatchOption.Builder` `withNoPut(boolean noPut)` filter out put event in server side.
`WatchOption.Builder` `withPrefix(ByteSequence prefix)` Enables watch all the keys with matching prefix.
`WatchOption.Builder` `withPrevKV(boolean prevKV)` When prevKV is set, created watcher gets the previous KV before the event happens, if the previous KV is not compacted.
`WatchOption.Builder` `withProgressNotify(boolean progressNotify)` When progressNotify is set, the watch server send periodic progress updates.
`WatchOption.Builder` `withRange(ByteSequence endKey)` Set the end key of the get request.
`WatchOption.Builder` `withRevision(long revision)` Provide the revision to use for the get request.

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

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

### Method Detail

#### withRevision

    public WatchOption.Builder withRevision(long revision)

Provide the revision to use for the get request.

If the revision is less or equal to zero, the get is over the newest key-value store.

If the revision has been compacted, ErrCompacted is returned as a response.

Parameters:
  `revision` - the revision to get.
Returns:
  builder

#### withRange

    public WatchOption.Builder withRange(ByteSequence endKey)

Set the end key of the get request. If it is set, the get request will return 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 gets all keys with the prefix (the given key).

If both key and end key are '\0', it returns all keys.

Parameters:
  `endKey` - end key
Returns:
  builder

#### withPrevKV

    public WatchOption.Builder withPrevKV(boolean prevKV)

When prevKV is set, created watcher gets the previous KV before the event happens, if the previous KV is not compacted.

Returns:
  builder

#### withProgressNotify

    public WatchOption.Builder withProgressNotify(boolean progressNotify)

When progressNotify is set, the watch server send periodic progress updates. Progress updates have zero events in WatchResponse.

Returns:
  builder

#### withNoPut

    public WatchOption.Builder withNoPut(boolean noPut)

filter out put event in server side.

#### withNoDelete

    public WatchOption.Builder withNoDelete(boolean noDelete)

filter out delete event in server side.

#### withPrefix

    public WatchOption.Builder withPrefix(ByteSequence prefix)

Enables watch all the keys with matching prefix.

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

#### build

    public WatchOption build()