A profile is a collection of settings to use when executing and preparing statements. Register different
profiles when creating the Cluster and execute/prepare statements with a particular profile
by providing its name to the relevant method in Session .
See Also:
Inherits
Object
Methods
Returns a new instance of Profile
Parameters:
Name
Type
Details
options
Hash
(defaults to: {})
hash of attributes. Unspecified attributes fall back to system defaults.
Keys for options :
Key
Type
Details
:timeout
Numeric
default:
12
Request execution timeout in
seconds. Setting value to nil will remove request timeout.
:load_balancing_policy
LoadBalancing::Policy
default:
LoadBalancing::Policies::TokenAware(LoadBalancing::Policies::DCAwareRoundRobin)
Load-balancing policy
that determines which node will run the next statement.
:retry_policy
Retry::Policy
default:
Retry::Policies::Default
Retry policy that
determines how request retries should be handled for different failure modes.
:consistency
Symbol
default:
:local_one
Consistency level with which to run statements. Must be one
of CONSISTENCIES .
Returns load-balancing policy that determines which node will run the
next statement.
Returns:
Type
Details
LoadBalancing::Policy
load-balancing policy that determines which node will run the
next statement.
Returns retry policy that determines how request retries should be handled for
different failure modes.
Returns:
Type
Details
Retry::Policy
retry policy that determines how request retries should be handled for
different failure modes.
Returns consistency level with which to run statements.
Returns:
Type
Details
Symbol
consistency level with which to run statements.
Returns request execution timeout in seconds. nil means there is no timeout.
Returns:
Type
Details
Numeric
request execution timeout in seconds. nil means there is no timeout.