Class GetOption

java.lang.Object
io.etcd.jetcd.options.GetOption

public final class GetOption extends Object
The option for get operation.
  • Field Details

    • DEFAULT

      public static final GetOption DEFAULT
  • Method Details

    • getLimit

      public long getLimit()
      Get the maximum number of keys to return for a get request.

      Note this filter does not affect the count field in GetResponse. GetResponse.getCount() always counts the number of keys matched on a range, independent of filters.

      Returns:
      the maximum number of keys to return.
    • getEndKey

      public Optional<ByteSequence> getEndKey()
      Get the end key for a range request
      Returns:
      the end key for a range request
    • getRevision

      public long getRevision()
      Get the revision for the request
      Returns:
      the revision for the request
    • getSortOrder

      public GetOption.SortOrder getSortOrder()
      Get the sort order for the request
      Returns:
      the sort order for the request
    • getSortField

      public GetOption.SortTarget getSortField()
      Get the sort field for the request
      Returns:
      the sort field for the request
    • isSerializable

      public boolean isSerializable()
      Return if the consistency level for this request is "serializable". Note serializable is a lower than default consistency, and implies the possibility of getting stale data.
      Returns:
      true if this request is only serializable consistency
    • isKeysOnly

      public boolean isKeysOnly()
      True if this request should get only keys in a range and there is no need to retrieve the values.
      Returns:
      true if only get keys
    • isCountOnly

      public boolean isCountOnly()
      True if this request should only populate the count of keys matching a range, and no other data.
      Returns:
      true if only get the count of keys
    • getMinCreateRevision

      public long getMinCreateRevision()
      Only populate results for keys that match a minimum value for a created revision.

      Note this filter does not affect the count field in GetResponse. GetResponse.getCount() always counts the number of keys matched on a range, independent of filters. For the same reason, it would be meaningless to mix setting a min create revision option with the count only option.

      Returns:
      minimum created revision to match, or zero for any.
    • getMaxCreateRevision

      public long getMaxCreateRevision()
      Only populate results for keys that match a maximum value for a created revision.

      Note this filter does not affect the count field in GetResponse. GetResponse.getCount() always counts the number of keys matched on a range, independent of filters. For the same reason, it would be meaningless to mix setting a max create revision option with the count only option.

      Returns:
      maximum created revision to match, or zero for any.
    • getMinModRevision

      public long getMinModRevision()
      Only populate results for keys that match a minimum value for a modified revision.

      Note this filter does not affect the count field in GetResponse. GetResponse.getCount() always counts the number of keys matched on a range, independent of filters. For the same reason, it would be meaningless to mix setting a min mod revision option with the count only option.

      Returns:
      minimum modified revision to match, or zero for any.
    • getMaxModRevision

      public long getMaxModRevision()
      Only populate results for keys that match a maximum value for a modified revision.

      Note this filter does not affect the count field in GetResponse. GetResponse.getCount() always counts the number of keys matched on a range, independent of filters. For the same reason, it would be meaningless to mix setting a max mod revision option with the count only option.

      Returns:
      maximum modified revision to match, or zero for any.
    • isPrefix

      public boolean isPrefix()
      True if this Get request should do prefix match
      Returns:
      true if this Get request should do prefix match
    • newBuilder

      @Deprecated public static GetOption.Builder newBuilder()
      Deprecated.
      Returns the builder.
      Returns:
      the builder
    • builder

      public static GetOption.Builder builder()