public static class WatchOption.Builder extends Object
| Modifier and Type | Method and Description |
|---|---|
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.
|
public WatchOption.Builder withRevision(long revision)
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.
revision - the revision to get.public WatchOption.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 gets all keys with the prefix (the given key).
If both key and end key are '\0', it returns all keys.
endKey - end keypublic WatchOption.Builder withPrevKV(boolean prevKV)
public WatchOption.Builder withProgressNotify(boolean progressNotify)
public WatchOption.Builder withNoPut(boolean noPut)
public WatchOption.Builder withNoDelete(boolean noDelete)
public WatchOption.Builder withPrefix(ByteSequence prefix)
prefix - the common prefix of all the keys that you want to watchpublic WatchOption build()
Copyright © 2020. All rights reserved.