Method: Ccp::Kvs::Tokyo::Cabinet#read

Defined in:
lib/ccp/kvs/tokyo/cabinet.rb

#readObject

bulk operations (not DRY but fast)



63
64
65
66
67
68
69
70
71
72
# File 'lib/ccp/kvs/tokyo/cabinet.rb', line 63

def read
  tryR("read")
  hash = {}
  @db.iterinit or tokyo_error!("read: ")
  while k = @db.iternext
    v = @db.get(k) or tokyo_error!("get(%s): " % k)
    hash[k] = decode(v)
  end
  return hash
end