Class: LS4::CSRPCService
Instance Method Summary
collapse
-
#add_node(nid, address, name, rsids, self_location) ⇒ Object
-
#get_mds_cache_uri ⇒ Object
-
#get_mds_uri ⇒ Object
-
#heartbeat(nid, sync_hash) ⇒ Object
def heartbeat(nid=nil, sync_hash).
-
#recover_node(nid) ⇒ Object
-
#remove_node(nid) ⇒ Object
-
#reset_replset_weight(rsid) ⇒ Object
-
#set_mds_cache_uri(uri) ⇒ Object
-
#set_mds_uri(uri) ⇒ Object
-
#set_replset_weight(rsid, weight) ⇒ Object
-
#stat(cmd) ⇒ Object
-
#sync_config(hash_array) ⇒ Object
-
#update_node_info(nid, address, name, rsids) ⇒ Object
Methods inherited from RPCService
#force_binary!
Methods inherited from Service
init
#ebus_bind!, #ebus_connect, extended
#ebus_all_slots, #ebus_disconnect!
#connect, #ebus_all_slots, #ebus_call_log, #ebus_call_slots, #ebus_signal_error, #ebus_signal_log, #ebus_signal_slots
#call_slot, #signal_slot
Instance Method Details
#add_node(nid, address, name, rsids, self_location) ⇒ Object
51
52
53
54
|
# File 'lib/ls4/service/rpc_cs.rb', line 51
def add_node(nid, address, name, rsids, self_location)
address = Address.load(address)
dispatch(CSRPCBus, :add_node, nid, address, name, rsids, self_location)
end
|
#get_mds_cache_uri ⇒ Object
86
87
88
|
# File 'lib/ls4/service/rpc_cs.rb', line 86
def get_mds_cache_uri
dispatch(CSRPCBus, :get_mds_cache_uri)
end
|
#get_mds_uri ⇒ Object
77
78
79
|
# File 'lib/ls4/service/rpc_cs.rb', line 77
def get_mds_uri
dispatch(CSRPCBus, :get_mds_uri)
end
|
#heartbeat(nid, sync_hash) ⇒ Object
def heartbeat(nid=nil, sync_hash)
39
40
41
42
|
# File 'lib/ls4/service/rpc_cs.rb', line 39
def heartbeat(nid, sync_hash)
force_binary!(sync_hash) if sync_hash
dispatch(CSRPCBus, :heartbeat, nid, sync_hash)
end
|
#recover_node(nid) ⇒ Object
65
66
67
|
# File 'lib/ls4/service/rpc_cs.rb', line 65
def recover_node(nid)
dispatch(CSRPCBus, :recover_node, nid)
end
|
#remove_node(nid) ⇒ Object
56
57
58
|
# File 'lib/ls4/service/rpc_cs.rb', line 56
def remove_node(nid)
dispatch(CSRPCBus, :remove_node, nid)
end
|
#reset_replset_weight(rsid) ⇒ Object
73
74
75
|
# File 'lib/ls4/service/rpc_cs.rb', line 73
def reset_replset_weight(rsid)
dispatch(CSRPCBus, :reset_replset_weight, rsid)
end
|
#set_mds_cache_uri(uri) ⇒ Object
90
91
92
93
|
# File 'lib/ls4/service/rpc_cs.rb', line 90
def set_mds_cache_uri(uri)
force_binary!(uri)
dispatch(CSRPCBus, :set_mds_cache_uri, uri)
end
|
#set_mds_uri(uri) ⇒ Object
81
82
83
84
|
# File 'lib/ls4/service/rpc_cs.rb', line 81
def set_mds_uri(uri)
force_binary!(uri)
dispatch(CSRPCBus, :set_mds_uri, uri)
end
|
#set_replset_weight(rsid, weight) ⇒ Object
69
70
71
|
# File 'lib/ls4/service/rpc_cs.rb', line 69
def set_replset_weight(rsid, weight)
dispatch(CSRPCBus, :set_replset_weight, rsid, weight)
end
|
#stat(cmd) ⇒ Object
95
96
97
|
# File 'lib/ls4/service/rpc_cs.rb', line 95
def stat(cmd)
dispatch(RPCBus, :stat, cmd)
end
|
#sync_config(hash_array) ⇒ Object
44
45
46
47
48
49
|
# File 'lib/ls4/service/rpc_cs.rb', line 44
def sync_config(hash_array)
hash_array = hash_array.map {|str|
force_binary!(str) if str
}
dispatch(CSRPCBus, :sync_config, hash_array)
end
|
#update_node_info(nid, address, name, rsids) ⇒ Object
60
61
62
63
|
# File 'lib/ls4/service/rpc_cs.rb', line 60
def update_node_info(nid, address, name, rsids)
address = Address.load(address)
dispatch(CSRPCBus, :update_node_info, nid, address, name, rsids)
end
|