Class: FDB::FutureKeyArray

Inherits:
Future
  • Object
show all
Defined in:
lib/fdbimpl.rb

Instance Method Summary collapse

Methods inherited from Future

#block_until_ready, #callback_wrapper, #cancel, finalize, #initialize, #on_ready, #ready?, wait_for_any

Constructor Details

This class inherits a constructor from FDB::Future

Instance Method Details

#waitObject



483
484
485
486
487
488
489
490
491
492
493
494
495
# File 'lib/fdbimpl.rb', line 483

def wait
  block_until_ready

  ks = FFI::MemoryPointer.new :pointer
  count = FFI::MemoryPointer.new :int
  FDBC.check_error FDBC.fdb_future_get_key_array(@fpointer, kvs, count)
  ks = ks.read_pointer

  (0..count.read_int-1).map{|i|
    x = FDBC::KeyStruct.new(ks + (i * FDBC::KeyStruct.size))
    x[:key].read_bytes(x[:key_length])
   }
end