Class: Cassandra::Retry::Policies::Default
- Inherits:
-
Object
- Object
- Cassandra::Retry::Policies::Default
- Includes:
- Cassandra::Retry::Policy
- Defined in:
- lib/cassandra/retry/policies/default.rb
Instance Method Summary collapse
- #read_timeout(statement, consistency, required, received, retrieved, retries) ⇒ Object
- #unavailable(statement, consistency, required, alive, retries) ⇒ Object
- #write_timeout(statement, consistency, type, required, received, retries) ⇒ Object
Instance Method Details
#read_timeout(statement, consistency, required, received, retrieved, retries) ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'lib/cassandra/retry/policies/default.rb', line 25 def read_timeout(statement, consistency, required, received, retrieved, retries) return reraise if retries > 0 if received >= required && !retrieved try_again(consistency) else reraise end end |
#unavailable(statement, consistency, required, alive, retries) ⇒ Object
41 42 43 |
# File 'lib/cassandra/retry/policies/default.rb', line 41 def unavailable(statement, consistency, required, alive, retries) reraise end |
#write_timeout(statement, consistency, type, required, received, retries) ⇒ Object
35 36 37 38 39 |
# File 'lib/cassandra/retry/policies/default.rb', line 35 def write_timeout(statement, consistency, type, required, received, retries) return reraise if retries > 0 type == :batch_log ? try_again(consistency) : reraise end |