lib/mongo/server_selector/primary_preferred.rb in mongo-2.15.0.alpha vs lib/mongo/server_selector/primary_preferred.rb in mongo-2.15.0
- old
+ new
@@ -1,5 +1,8 @@
+# frozen_string_literal: true
+# encoding: utf-8
+
# Copyright (C) 2014-2020 MongoDB Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@@ -37,16 +40,15 @@
# @since 2.0.0
def name
:primary_preferred
end
- # Whether the slaveOk bit should be set on wire protocol messages.
+ # Whether the secondaryOk bit should be set on wire protocol messages.
# I.e. whether the operation can be performed on a secondary server.
#
# @return [ true ] true
- #
- # @since 2.0.0
- def slave_ok?
+ # @api private
+ def secondary_ok?
true
end
# Whether tag sets are allowed to be defined for this server preference.
#