Class: Cql::Protocol::Request
- Inherits:
-
Object
- Object
- Cql::Protocol::Request
- Includes:
- Encoding
- Defined in:
- lib/cql/protocol/request.rb
Direct Known Subclasses
CredentialsRequest, ExecuteRequest, OptionsRequest, PrepareRequest, QueryRequest, RegisterRequest, StartupRequest
Instance Attribute Summary collapse
-
#opcode ⇒ Object
readonly
Returns the value of attribute opcode.
-
#trace ⇒ Object
readonly
Returns the value of attribute trace.
Instance Method Summary collapse
- #compressable? ⇒ Boolean
-
#initialize(opcode, trace = false) ⇒ Request
constructor
A new instance of Request.
- #trace? ⇒ Boolean
Methods included from Encoding
#write_bytes, #write_consistency, #write_decimal, #write_double, #write_float, #write_int, #write_long, #write_long_string, #write_short, #write_short_bytes, #write_string, #write_string_list, #write_string_map, #write_uuid, #write_varint
Constructor Details
#initialize(opcode, trace = false) ⇒ Request
Returns a new instance of Request.
10 11 12 13 |
# File 'lib/cql/protocol/request.rb', line 10 def initialize(opcode, trace=false) @opcode = opcode @trace = trace end |
Instance Attribute Details
#opcode ⇒ Object (readonly)
Returns the value of attribute opcode.
8 9 10 |
# File 'lib/cql/protocol/request.rb', line 8 def opcode @opcode end |
#trace ⇒ Object (readonly)
Returns the value of attribute trace.
8 9 10 |
# File 'lib/cql/protocol/request.rb', line 8 def trace @trace end |
Instance Method Details
#compressable? ⇒ Boolean
19 20 21 |
# File 'lib/cql/protocol/request.rb', line 19 def compressable? true end |
#trace? ⇒ Boolean
15 16 17 |
# File 'lib/cql/protocol/request.rb', line 15 def trace? @trace end |