Class: RedisClient::Cluster::Node::Info

Inherits:
Struct
  • Object
show all
Defined in:
lib/redis_client/cluster/node.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#config_epochObject

Returns the value of attribute config_epoch

Returns:

  • (Object)

    the current value of config_epoch



27
28
29
# File 'lib/redis_client/cluster/node.rb', line 27

def config_epoch
  @config_epoch
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



27
28
29
# File 'lib/redis_client/cluster/node.rb', line 27

def id
  @id
end

Returns the value of attribute link_state

Returns:

  • (Object)

    the current value of link_state



27
28
29
# File 'lib/redis_client/cluster/node.rb', line 27

def link_state
  @link_state
end

#node_keyObject

Returns the value of attribute node_key

Returns:

  • (Object)

    the current value of node_key



27
28
29
# File 'lib/redis_client/cluster/node.rb', line 27

def node_key
  @node_key
end

#ping_sentObject

Returns the value of attribute ping_sent

Returns:

  • (Object)

    the current value of ping_sent



27
28
29
# File 'lib/redis_client/cluster/node.rb', line 27

def ping_sent
  @ping_sent
end

#pong_recvObject

Returns the value of attribute pong_recv

Returns:

  • (Object)

    the current value of pong_recv



27
28
29
# File 'lib/redis_client/cluster/node.rb', line 27

def pong_recv
  @pong_recv
end

#primary_idObject

Returns the value of attribute primary_id

Returns:

  • (Object)

    the current value of primary_id



27
28
29
# File 'lib/redis_client/cluster/node.rb', line 27

def primary_id
  @primary_id
end

#roleObject

Returns the value of attribute role

Returns:

  • (Object)

    the current value of role



27
28
29
# File 'lib/redis_client/cluster/node.rb', line 27

def role
  @role
end

#slotsObject

Returns the value of attribute slots

Returns:

  • (Object)

    the current value of slots



27
28
29
# File 'lib/redis_client/cluster/node.rb', line 27

def slots
  @slots
end

Instance Method Details

#primary?Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/redis_client/cluster/node.rb', line 33

def primary?
  role == 'master'
end

#replica?Boolean

Returns:

  • (Boolean)


37
38
39
# File 'lib/redis_client/cluster/node.rb', line 37

def replica?
  role == 'slave'
end