Class: TokyoCabinet::HDB

Inherits:
Object
  • Object
show all
Defined in:
lib/roma/storage/tc_storage.rb

Instance Method Summary collapse

Instance Method Details

#get(key) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/roma/storage/tc_storage.rb', line 12

def get key
  ret = get_org key
  if ret == nil && ecode != ENOREC
    raise StorageException, errmsg(ecode)
  end
  ret
end

#get_orgObject



11
# File 'lib/roma/storage/tc_storage.rb', line 11

alias get_org get

#out(key) ⇒ Object



28
29
30
31
32
33
34
# File 'lib/roma/storage/tc_storage.rb', line 28

def out key
  ret = out_org key
  if ret == false && ecode != ENOREC
    raise StorageException, errmsg(ecode)
  end
  ret
end

#out_orgObject



27
# File 'lib/roma/storage/tc_storage.rb', line 27

alias out_org out

#put(key, value) ⇒ Object

Raises:



21
22
23
24
25
# File 'lib/roma/storage/tc_storage.rb', line 21

def put key, value
  ret = put_org key, value
  raise StorageException, errmsg(ecode) unless ret
  ret
end

#put_orgObject



20
# File 'lib/roma/storage/tc_storage.rb', line 20

alias put_org put