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 boolean
equals(Object o)
int
hashCode()
static Queried
immediately()
Long
limit()
Gets the maximum number of records to return.static Queried
locally()
Duration
queryTimeout()
Gets the maximum duration for executing the execute.boolean
remoteAccessAllowed()
Gets whether remote access is allowed.int
retries()
Gets the maximum number of attempts.static Queried
retries(int retries, Duration retryBackoff)
Duration
retryBackoff()
Gets the time interval before attempting a new operation.String
toString()
static Queried
with(Duration timeout)
Queried
withLimit(Long limit)
Queried
withQueryTimeout(Duration timeout)
Queried
withRemoteAccessAllowed(boolean remoteAccessAllowed)
Queried
withRetries(int retries)
Queried
withRetryBackoffMs(Duration retryBackoff)
-
-
-
Constructor Detail
-
Queried
public Queried(int retries, Duration retryBackoff, Duration queryTimeout, boolean remoteAccessAllowed, Long limit)
Creates a newQueried
instance.- 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:
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.
-
-