Class Queried
- java.lang.Object
-
- io.streamthoughts.azkarra.api.query.Queried
-
public class Queried extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)inthashCode()static Queriedimmediately()Longlimit()Gets the maximum number of records to return. -1 is infinite.static Queriedlocally()DurationqueryTimeout()Gets the maximum duration for executing the execute.booleanremoteAccessAllowed()Gets whether remote access is allowed.intretries()Gets the maximum number of attempts.static Queriedretries(int retries, Duration retryBackoff)DurationretryBackoff()Gets the time interval before attempting a new operation.StringtoString()static Queriedwith(Duration timeout)QueriedwithLimit(Long limit)QueriedwithQueryTimeout(Duration timeout)QueriedwithRemoteAccessAllowed(boolean remoteAccessAllowed)QueriedwithRetries(int retries)QueriedwithRetryBackoffMs(Duration retryBackoff)
-
-
-
Constructor Detail
-
Queried
public Queried(int retries, Duration retryBackoff, Duration queryTimeout, boolean remoteAccessAllowed, Long limit)Creates a newQueriedinstance.- Parameters:
retries-retries.retryBackoff-retryBackoff.queryTimeout-queryTimeout.remoteAccessAllowed-retryBackoff.limit-limit.
-
-
Method Detail
-
locally
public static Queried locally()
-
immediately
public static Queried immediately()
-
withRemoteAccessAllowed
public Queried withRemoteAccessAllowed(boolean remoteAccessAllowed)
-
withRetries
public Queried 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:
trueif remote access if allowed,falseotherwise.
-
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.
-
-