File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -161,9 +161,16 @@ def protocol_version
161161 @connection_options . protocol_version
162162 end
163163
164+ # @param name [String] Name of profile to retrieve
165+ # @return [Cassandra::Execution::Profile] execution profile of the given name
166+ def execution_profile ( name )
167+ @profile_manager . profiles [ name ]
168+ end
169+
164170 # @return [Hash<String, Cassandra::Execution::Profile>] the collection of execution profiles
165171 def execution_profiles
166- @profile_manager . profiles
172+ # Return a dup of the hash to prevent the user from adding/removing profiles from the profile-manager.
173+ @profile_manager . profiles . dup
167174 end
168175
169176 # @!method refresh_schema_async
@@ -288,12 +295,6 @@ def close
288295 close_async . get
289296 end
290297
291- # @param name [String] Name of profile to retrieve
292- # @return [Cassandra::Execution::Profile] execution profile of the given name.
293- def execution_profile ( name )
294- @profile_manager . profiles [ name ]
295- end
296-
297298 # @private
298299 def inspect
299300 "#<#{ self . class . name } :0x#{ object_id . to_s ( 16 ) } " \
Original file line number Diff line number Diff line change @@ -59,7 +59,6 @@ def distance(host)
5959
6060 # NOTE: It's only safe to call add_profile when setting up the cluster object. In particular,
6161 # this is only ok before calling Driver#connect.
62- # @private
6362 def add_profile ( name , profile )
6463 @profiles [ name ] = profile
6564 @load_balancing_policies << profile . load_balancing_policy if profile . load_balancing_policy
You can’t perform that action at this time.
0 commit comments