Class: ServerInfo
- Inherits:
-
Object
- Object
- ServerInfo
- Defined in:
- lib/reminder-client/server_info.rb
Constant Summary collapse
- DEFAULT_OPTIONS =
{ :groupPath => nil, :memberName => "default", :ip => nil, :port => nil, :serviceType => nil, :serviceName => nil, :workerSize => nil, :selectorSize => nil }
Instance Attribute Summary collapse
-
#groupPath ⇒ Object
Returns the value of attribute groupPath.
-
#ip ⇒ Object
Returns the value of attribute ip.
-
#memberName ⇒ Object
Returns the value of attribute memberName.
-
#port ⇒ Object
Returns the value of attribute port.
-
#selectorSize ⇒ Object
Returns the value of attribute selectorSize.
-
#serviceName ⇒ Object
Returns the value of attribute serviceName.
-
#serviceType ⇒ Object
Returns the value of attribute serviceType.
-
#workerSize ⇒ Object
Returns the value of attribute workerSize.
Instance Method Summary collapse
- #getHash ⇒ Object
-
#initialize(options) ⇒ ServerInfo
constructor
A new instance of ServerInfo.
Constructor Details
#initialize(options) ⇒ ServerInfo
Returns a new instance of ServerInfo.
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/reminder-client/server_info.rb', line 15 def initialize() raise "initialize ServerInfo error, options can not be nil." if == nil #@options = DEFAULT_OPTIONS.merge(options) @groupPath = [:groupPath] if [:memberName].nil? @memberName = "default" else @memberName = [:memberName] end @ip = [:ip] @port = [:port] @serviceType = [:serviceType] @serviceName = [:serviceName] @workerSize = [:workerSize] @selectorSize = [:selectorSize] end |
Instance Attribute Details
#groupPath ⇒ Object
Returns the value of attribute groupPath.
2 3 4 |
# File 'lib/reminder-client/server_info.rb', line 2 def groupPath @groupPath end |
#ip ⇒ Object
Returns the value of attribute ip.
2 3 4 |
# File 'lib/reminder-client/server_info.rb', line 2 def ip @ip end |
#memberName ⇒ Object
Returns the value of attribute memberName.
2 3 4 |
# File 'lib/reminder-client/server_info.rb', line 2 def memberName @memberName end |
#port ⇒ Object
Returns the value of attribute port.
2 3 4 |
# File 'lib/reminder-client/server_info.rb', line 2 def port @port end |
#selectorSize ⇒ Object
Returns the value of attribute selectorSize.
2 3 4 |
# File 'lib/reminder-client/server_info.rb', line 2 def selectorSize @selectorSize end |
#serviceName ⇒ Object
Returns the value of attribute serviceName.
2 3 4 |
# File 'lib/reminder-client/server_info.rb', line 2 def serviceName @serviceName end |
#serviceType ⇒ Object
Returns the value of attribute serviceType.
2 3 4 |
# File 'lib/reminder-client/server_info.rb', line 2 def serviceType @serviceType end |
#workerSize ⇒ Object
Returns the value of attribute workerSize.
2 3 4 |
# File 'lib/reminder-client/server_info.rb', line 2 def workerSize @workerSize end |
Instance Method Details
#getHash ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/reminder-client/server_info.rb', line 32 def getHash { :groupPath => @groupPath, :memberName => @memberName, :ip => @ip, :port => @port, :serviceType => @serviceType, :serviceName => @serviceName, :workerSize => @workerSize, :selectorSize => @selectorSize } end |