Class: LS4::DataClientService

Inherits:
Service show all
Defined in:
lib/ls4/service/data_client.rb

Instance Method Summary collapse

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

#delete(okey, &cb) ⇒ Object



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

def delete(okey, &cb)
	call_rsid(okey, :delete_direct, [okey], &cb)
end

#get(okey, found_expected = false, &cb) ⇒ Object

TODO localhost optimization if DataServer is connected



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

def get(okey, found_expected=false, &cb)
	call_rsid(okey, :get_direct, [okey], found_expected, &cb)
end

#read(okey, offset, size, found_expected = false, &cb) ⇒ Object



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

def read(okey, offset, size, found_expected=false, &cb)
	call_rsid(okey, :read_direct, [okey, offset, size], found_expected, &cb)
end

#set(okey, data, &cb) ⇒ Object



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

def set(okey, data, &cb)
	call_rsid(okey, :set_direct, [okey, data], &cb)
end

#url(okey, found_expected, &cb) ⇒ Object

def resize(okey, size, &cb) call_rsid(okey, :resize_direct, [okey], size) end



80
81
82
# File 'lib/ls4/service/data_client.rb', line 80

def url(okey, found_expected, &cb)
	call_rsid(okey, :url_direct, [okey], found_expected, &cb)
end