Class: Cassandra::Execution::Options
- Inherits:
-
Object
- Object
- Cassandra::Execution::Options
- Defined in:
- lib/cassandra/execution/options.rb
Instance Attribute Summary collapse
-
#arguments ⇒ Array
readonly
Positional arguments for the statement.
-
#consistency ⇒ Symbol
readonly
Consistency for request.
-
#load_balancing_policy ⇒ Cassandra::LoadBalancing::Policy
readonly
Load-balancing policy that determines which node will run the next statement.
-
#page_size ⇒ Integer
readonly
Requested page size.
-
#paging_state ⇒ String
readonly
Paging state.
-
#payload ⇒ nil, Hash<String, String>
readonly
Custom outgoing payload, a map of string and byte buffers.
-
#retry_policy ⇒ Cassandra::Retry::Policy
readonly
Retry policy that determines how request retries should be handled for different failure modes.
-
#serial_consistency ⇒ Symbol
readonly
Consistency for request with conditional updates (lightweight - compare-and-set, CAS - transactions).
-
#timeout ⇒ Numeric
readonly
Request timeout interval.
-
#type_hints ⇒ Array
readonly
Type hints for positional arguments for the statement.
Instance Method Summary collapse
-
#idempotent? ⇒ Boolean
Whether statement can be retried on timeout.
-
#trace? ⇒ Boolean
Whether request tracing was enabled.
Instance Attribute Details
#arguments ⇒ Array (readonly)
Returns positional arguments for the statement.
34 35 36 |
# File 'lib/cassandra/execution/options.rb', line 34 def arguments @arguments end |
#consistency ⇒ Symbol (readonly)
Returns consistency for request. Must be one of CONSISTENCIES.
24 25 26 |
# File 'lib/cassandra/execution/options.rb', line 24 def consistency @consistency end |
#load_balancing_policy ⇒ Cassandra::LoadBalancing::Policy (readonly)
Returns load-balancing policy that determines which node will run the next statement.
69 70 71 |
# File 'lib/cassandra/execution/options.rb', line 69 def load_balancing_policy @load_balancing_policy end |
#page_size ⇒ Integer (readonly)
Returns requested page size.
30 31 32 |
# File 'lib/cassandra/execution/options.rb', line 30 def page_size @page_size end |
#paging_state ⇒ String (readonly)
Although this feature exists to allow web applications to store paging state in an HTTP cookie, it is not safe to expose without encrypting or otherwise securing it. Paging state contains information internal to the Apache Cassandra cluster, such as partition key and data. Additionally, if a paging state is sent with CQL statement, different from the original, the behavior of Cassandra is undefined and will likely cause a server process of the coordinator of such request to abort.
Returns paging state.
50 51 52 |
# File 'lib/cassandra/execution/options.rb', line 50 def paging_state @paging_state end |
#payload ⇒ nil, Hash<String, String> (readonly)
Returns custom outgoing payload, a map of string and byte buffers.
65 66 67 |
# File 'lib/cassandra/execution/options.rb', line 65 def payload @payload end |
#retry_policy ⇒ Cassandra::Retry::Policy (readonly)
Returns retry policy that determines how request retries should be handled for different failure modes.
73 74 75 |
# File 'lib/cassandra/execution/options.rb', line 73 def retry_policy @retry_policy end |
#serial_consistency ⇒ Symbol (readonly)
Returns consistency for request with conditional updates (lightweight - compare-and-set, CAS - transactions). Must be one of SERIAL_CONSISTENCIES.
28 29 30 |
# File 'lib/cassandra/execution/options.rb', line 28 def serial_consistency @serial_consistency end |
#timeout ⇒ Numeric (readonly)
Returns request timeout interval.
32 33 34 |
# File 'lib/cassandra/execution/options.rb', line 32 def timeout @timeout end |
#type_hints ⇒ Array (readonly)
Returns type hints for positional arguments for the statement.
36 37 38 |
# File 'lib/cassandra/execution/options.rb', line 36 def type_hints @type_hints end |
Instance Method Details
#idempotent? ⇒ Boolean
Returns whether statement can be retried on timeout.
229 230 231 |
# File 'lib/cassandra/execution/options.rb', line 229 def idempotent? @idempotent end |
#trace? ⇒ Boolean
Returns whether request tracing was enabled.
224 225 226 |
# File 'lib/cassandra/execution/options.rb', line 224 def trace? @trace end |