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



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

def config_epoch
  @config_epoch
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



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

def id
  @id
end

Returns the value of attribute link_state

Returns:

  • (Object)

    the current value of link_state



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

def link_state
  @link_state
end

#node_keyObject

Returns the value of attribute node_key

Returns:

  • (Object)

    the current value of node_key



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

def node_key
  @node_key
end

#ping_sentObject

Returns the value of attribute ping_sent

Returns:

  • (Object)

    the current value of ping_sent



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

def ping_sent
  @ping_sent
end

#pong_recvObject

Returns the value of attribute pong_recv

Returns:

  • (Object)

    the current value of pong_recv



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

def pong_recv
  @pong_recv
end

#primary_idObject

Returns the value of attribute primary_id

Returns:

  • (Object)

    the current value of primary_id



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

def primary_id
  @primary_id
end

#roleObject

Returns the value of attribute role

Returns:

  • (Object)

    the current value of role



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

def role
  @role
end

#slotsObject

Returns the value of attribute slots

Returns:

  • (Object)

    the current value of slots



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

def slots
  @slots
end

Instance Method Details

#primary?Boolean

Returns:

  • (Boolean)


39
40
41
# File 'lib/redis_client/cluster/node.rb', line 39

def primary?
  role == 'master'
end

#replica?Boolean

Returns:

  • (Boolean)


43
44
45
# File 'lib/redis_client/cluster/node.rb', line 43

def replica?
  role == 'slave'
end