Class: HBase::Table::CheckedOperation

Inherits:
Object
  • Object
show all
Defined in:
lib/hbase-jruby/table/checked_operation.rb

Instance Method Summary collapse

Constructor Details

#initialize(table, mutation, rowkey, cf, cq, val) ⇒ CheckedOperation

Returns a new instance of CheckedOperation.



4
5
6
7
8
9
10
11
# File 'lib/hbase-jruby/table/checked_operation.rb', line 4

def initialize table, mutation, rowkey, cf, cq, val
  @table   = table
  @mutation = mutation
  @rowkey   = rowkey
  @cf       = cf
  @cq       = cq
  @val      = val
end

Instance Method Details

#delete(*extra) ⇒ Object

Parameters:

  • extra (Object*)

    Optional delete specification. Column family, qualifier, and timestamps



20
21
22
23
# File 'lib/hbase-jruby/table/checked_operation.rb', line 20

def delete *extra
  @table.htable.checkAndDelete(
    @rowkey, @cf, @cq, @val, @mutation.delete(@rowkey, *extra))
end

#put(props) ⇒ Object

Parameters:

  • props (Hash)


14
15
16
17
# File 'lib/hbase-jruby/table/checked_operation.rb', line 14

def put props
  @table.htable.checkAndPut(
    @rowkey, @cf, @cq, @val, @mutation.put(@rowkey, props))
end