Package com.aerospike.client.policy
Enum Class QueryDuration
- All Implemented Interfaces:
Serializable
,Comparable<QueryDuration>
,Constable
Expected query duration. The server treats the query in different ways depending on the expected duration.
This enum is ignored for aggregation queries, background queries and server versions < 6.0.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe query is expected to return more than 100 records per node.Treat query as a LONG query, but relax read consistency for AP namespaces.The query is expected to return less than 100 records per node. -
Method Summary
Modifier and TypeMethodDescriptionstatic QueryDuration
Returns the enum constant of this class with the specified name.static QueryDuration[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
LONG
The query is expected to return more than 100 records per node. The server optimizes for a large record set in the following ways:- Allow query to be run in multiple threads using the server's query threading configuration.
- Do not relax read consistency for AP namespaces.
- Add the query to the server's query monitor.
- Do not add the overall latency to the server's latency histogram.
- Do not allow server timeouts.
-
SHORT
The query is expected to return less than 100 records per node. The server optimizes for a small record set in the following ways:- Always run the query in one thread and ignore the server's query threading configuration.
- Allow query to be inlined directly on the server's service thread.
- Relax read consistency for AP namespaces.
- Do not add the query to the server's query monitor.
- Add the overall latency to the server's latency histogram.
- Allow server timeouts. The default server timeout for a short query is 1 second.
-
LONG_RELAX_AP
Treat query as a LONG query, but relax read consistency for AP namespaces. This value is treated exactly like LONG for server versions < 7.1.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-