Class QueryOptions


  • public class QueryOptions
    extends Object
    The QueryOptions cane be used to set the options to be used for querying a state store.
    • Method Detail

      • with

        public static QueryOptions with​(Duration timeout)
        Helper method to create a new QueryOptions with the given timeout.
        Parameters:
        timeout - the total time of state store execute.
        Returns:
        a new QueryOptions instance.
      • retries

        public static QueryOptions retries​(int retries,
                                           Duration retryBackoff)
        Helper method to create a new QueryOptions with the given retries and retryBackoff.
        Parameters:
        retries - number of attempts to run after failed access.
        retryBackoff - time to wait before attempting to retry a failed access.
        Returns:
        a new QueryOptions instance.
      • withRemoteAccessAllowed

        public QueryOptions withRemoteAccessAllowed​(boolean remoteAccessAllowed)
      • withRetries

        public QueryOptions withRetries​(int retries)
      • retries

        public int retries()
        Gets the maximum number of attempts.
        Returns:
        the number retries.
      • retryBackoff

        public Duration retryBackoff()
        Gets the time interval before attempting a new operation.
        Returns:
        the retry backoff.
      • remoteAccessAllowed

        public boolean remoteAccessAllowed()
        Gets whether remote access is allowed.
        Returns:
        true if remote access if allowed, false otherwise.
      • queryTimeout

        public Duration queryTimeout()
        Gets the maximum duration for executing the execute.
        Returns:
        the timeout.
      • limit

        public Long limit()
        Gets the maximum number of records to return. -1 is infinite.
        Returns:
        the limit.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object