Class: LS4::GWRPCService

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

Direct Known Subclasses

DSRPCService

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(key, data, attrs) ⇒ Object

add



139
140
141
142
# File 'lib/ls4/service/rpc_gw.rb', line 139

def add(key, data, attrs)
	force_binary!(data)
	dispatch(GWRPCBus, :add, key, data, attrs)
end

#add_data(key, data) ⇒ Object



144
145
146
147
# File 'lib/ls4/service/rpc_gw.rb', line 144

def add_data(key, data)
	force_binary!(data)
	dispatch(GWRPCBus, :add_data, key, data)
end

#addv(vname, key, data, attrs) ⇒ Object

add with version name



153
154
155
156
157
# File 'lib/ls4/service/rpc_gw.rb', line 153

def addv(vname, key, data, attrs)
	vname = vname.to_s  # TODO type check
	force_binary!(data)
	dispatch(GWRPCBus, :addv, vname, key, data, attrs)
end

#addv_data(vname, key, data) ⇒ Object



159
160
161
162
163
# File 'lib/ls4/service/rpc_gw.rb', line 159

def addv_data(vname, key, data)
	vname = vname.to_s  # TODO type check
	force_binary!(data)
	dispatch(GWRPCBus, :addv_data, vname, key, data)
end

#delete(key) ⇒ Object

delete



203
204
205
# File 'lib/ls4/service/rpc_gw.rb', line 203

def delete(key)
	dispatch(GWRPCBus, :delete, key)
end

#deletet(vtime, key) ⇒ Object



207
208
209
210
# File 'lib/ls4/service/rpc_gw.rb', line 207

def deletet(vtime, key)
	vtime = vtime.to_i  # TODO type check
	dispatch(GWRPCBus, :deletet, vtime, key)
end

#deletev(vname, key) ⇒ Object



212
213
214
215
# File 'lib/ls4/service/rpc_gw.rb', line 212

def deletev(vname, key)
	vname = vname.to_s  # TODO type check
	dispatch(GWRPCBus, :deletev, vname, key)
end

#get(key) ⇒ Object

get head



56
57
58
# File 'lib/ls4/service/rpc_gw.rb', line 56

def get(key)
	dispatch(GWRPCBus, :get, key)
end

#get_attrs(key) ⇒ Object



64
65
66
# File 'lib/ls4/service/rpc_gw.rb', line 64

def get_attrs(key)
	dispatch(GWRPCBus, :get_attrs, key)
end

#get_data(key) ⇒ Object



60
61
62
# File 'lib/ls4/service/rpc_gw.rb', line 60

def get_data(key)
	dispatch(GWRPCBus, :get_data, key)
end

#getd_data(okey) ⇒ Object

direct get



125
126
127
128
# File 'lib/ls4/service/rpc_gw.rb', line 125

def getd_data(okey)
	okey = ObjectKey.new.from_msgpack(okey)
	dispatch(GWRPCBus, :getd_data, okey)
end

#gett(vtime, key) ⇒ Object

time-based get version



76
77
78
79
# File 'lib/ls4/service/rpc_gw.rb', line 76

def gett(vtime, key)
	vtime = vtime.to_i  # TODO type check
	dispatch(GWRPCBus, :gett, vtime, key)
end

#gett_attrs(vtime, key) ⇒ Object



86
87
88
89
# File 'lib/ls4/service/rpc_gw.rb', line 86

def gett_attrs(vtime, key)
	vtime = vtime.to_i  # TODO type check
	dispatch(GWRPCBus, :gett_attrs, vtime, key)
end

#gett_data(vtime, key) ⇒ Object



81
82
83
84
# File 'lib/ls4/service/rpc_gw.rb', line 81

def gett_data(vtime, key)
	vtime = vtime.to_i  # TODO type check
	dispatch(GWRPCBus, :gett_data, vtime, key)
end

#getv(vname, key) ⇒ Object

name-based get version



100
101
102
103
# File 'lib/ls4/service/rpc_gw.rb', line 100

def getv(vname, key)
	vname = vname.to_s  # TODO type check
	dispatch(GWRPCBus, :getv, vname, key)
end

#getv_attrs(vname, key) ⇒ Object



110
111
112
113
# File 'lib/ls4/service/rpc_gw.rb', line 110

def getv_attrs(vname, key)
	vname = vname.to_s  # TODO type check
	dispatch(GWRPCBus, :getv_attrs, vname, key)
end

#getv_data(vname, key) ⇒ Object



105
106
107
108
# File 'lib/ls4/service/rpc_gw.rb', line 105

def getv_data(vname, key)
	vname = vname.to_s  # TODO type check
	dispatch(GWRPCBus, :getv_data, vname, key)
end

#read(key, offset, size) ⇒ Object



68
69
70
# File 'lib/ls4/service/rpc_gw.rb', line 68

def read(key, offset, size)
	dispatch(GWRPCBus, :read, key, offset, size)
end

#readd(okey, offset, size) ⇒ Object



130
131
132
133
# File 'lib/ls4/service/rpc_gw.rb', line 130

def readd(okey, offset, size)
	okey = ObjectKey.new.from_msgpack(okey)
	dispatch(GWRPCBus, :readd, okey, offset, size)
end

#readt(vtime, key, offset, size) ⇒ Object



91
92
93
94
# File 'lib/ls4/service/rpc_gw.rb', line 91

def readt(vtime, key, offset, size)
	vtime = vtime.to_i  # TODO type check
	dispatch(GWRPCBus, :readt, vtime, key, offset, size)
end

#readv(vname, key, offset, size) ⇒ Object



115
116
117
118
# File 'lib/ls4/service/rpc_gw.rb', line 115

def readv(vname, key, offset, size)
	vname = vname.to_s  # TODO type check
	dispatch(GWRPCBus, :readt, vname, key, offset, size)
end

#remove(key) ⇒ Object

remove



195
196
197
# File 'lib/ls4/service/rpc_gw.rb', line 195

def remove(key)
	dispatch(GWRPCBus, :remove, key)
end

#stat(cmd) ⇒ Object



249
250
251
# File 'lib/ls4/service/rpc_gw.rb', line 249

def stat(cmd)
	dispatch(RPCBus, :stat, cmd)
end

#update_attrs(key, attrs) ⇒ Object

in-place update attributes



187
188
189
# File 'lib/ls4/service/rpc_gw.rb', line 187

def update_attrs(key, attrs)
	dispatch(GWRPCBus, :update_attrs, key, attrs)
end

#url(key) ⇒ Object

URL



226
227
228
# File 'lib/ls4/service/rpc_gw.rb', line 226

def url(key)
	dispatch(GWRPCBus, :url, key)
end

#urlt(vtime, key) ⇒ Object



230
231
232
233
# File 'lib/ls4/service/rpc_gw.rb', line 230

def urlt(vtime, key)
	vtime = vtime.to_i  # TODO type check
	dispatch(GWRPCBus, :urlt, vtime, key)
end

#urlv(vname, key) ⇒ Object



235
236
237
238
# File 'lib/ls4/service/rpc_gw.rb', line 235

def urlv(vname, key)
	vname = vname.to_s  # TODO type check
	dispatch(GWRPCBus, :urlv, vname, key)
end

#util_locate(key) ⇒ Object

Utility



244
245
246
# File 'lib/ls4/service/rpc_gw.rb', line 244

def util_locate(key)
	dispatch(GWRPCBus, :util_locate, key)
end