Class: LS4::CSRPCService

Inherits:
RPCService show all
Defined in:
lib/ls4/service/rpc_cs.rb

Instance Method Summary collapse

Methods inherited from RPCService

#force_binary!

Methods inherited from Service

init

Methods included from EventBus::SingletonMixin

#ebus_bind!, #ebus_connect, extended

Methods included from EventBus::BusMixin

#ebus_all_slots, #ebus_disconnect!

Methods included from EventBus::DeclarerBase::Methods

#connect, #ebus_all_slots, #ebus_call_log, #ebus_call_slots, #ebus_signal_error, #ebus_signal_log, #ebus_signal_slots

Methods included from EventBus::DeclarerBase

#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_uriObject



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_uriObject



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