| Modifier and Type | Method and Description |
|---|---|
GetOption |
build() |
GetOption.Builder |
isPrefix(boolean prefix)
Enables 'Get' requests to obtain all the keys by prefix.
|
GetOption.Builder |
withCountOnly(boolean countOnly)
Set the get request to only return count of the keys.
|
GetOption.Builder |
withKeysOnly(boolean keysOnly)
Set the get request to only return keys.
|
GetOption.Builder |
withLimit(long limit)
Limit the number of keys to return for a get request.
|
GetOption.Builder |
withMaxCreateRevision(long createRevision)
Limit returned keys to those with create revision less than the provided value.
|
GetOption.Builder |
withMaxModRevision(long modRevision)
Limit returned keys to those with mod revision less than the provided value.
|
GetOption.Builder |
withMinCreateRevision(long createRevision)
Limit returned keys to those with create revision greater than the provided value.
|
GetOption.Builder |
withMinModRevision(long modRevision)
Limit returned keys to those with mod revision greater than the provided value.
|
GetOption.Builder |
withPrefix(ByteSequence prefix)
Deprecated.
Use
isPrefix(boolean) instead. |
GetOption.Builder |
withRange(ByteSequence endKey)
Set the end key of the get request.
|
GetOption.Builder |
withRevision(long revision)
Provide the revision to use for the get request.
|
GetOption.Builder |
withSerializable(boolean serializable)
Set the get request to be a serializable get request.
|
GetOption.Builder |
withSortField(GetOption.SortTarget field)
Sort the return key value pairs in the provided field.
|
GetOption.Builder |
withSortOrder(GetOption.SortOrder order)
Sort the return key value pairs in the provided order.
|
public GetOption.Builder withLimit(long limit)
limit - the maximum number of keys to return for a get request.public GetOption.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 GetOption.Builder withSortOrder(GetOption.SortOrder order)
order - order to sort the returned key value pairs.public GetOption.Builder withSortField(GetOption.SortTarget field)
field - field to sort the key value pairs by the providedpublic GetOption.Builder withSerializable(boolean serializable)
Get requests are linearizable by default. For better performance, a serializable get request is served locally without needing to reach consensus with other nodes in the cluster.
serializable - is the get request a serializable get request.public GetOption.Builder withKeysOnly(boolean keysOnly)
keysOnly - flag to only return keyspublic GetOption.Builder withCountOnly(boolean countOnly)
countOnly - flag to only return count of the keyspublic GetOption.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 GetOption.Builder isPrefix(boolean prefix)
prefix - flag to obtain all the keys by prefix@Deprecated public GetOption.Builder withPrefix(ByteSequence prefix)
isPrefix(boolean) instead.
You should pass the key that is passed into
KV.get method into this method as the given key.
prefix - the common prefix of all the keys that you want to getpublic GetOption.Builder withMinCreateRevision(long createRevision)
createRevision - create revisionpublic GetOption.Builder withMaxCreateRevision(long createRevision)
createRevision - create revisionpublic GetOption.Builder withMinModRevision(long modRevision)
modRevision - mod revisionpublic GetOption.Builder withMaxModRevision(long modRevision)
modRevision - mod revisionpublic GetOption build()
Copyright © 2021. All rights reserved.