Class RR::ProxyBlockCursor
In: lib/rubyrep/proxy_block_cursor.rb
Parent: ProxyCursor

This class is used to scan a table in blocks. Calculates the checksums of the scanned blocks.

Methods

Included Modules

TableScanHelper

Attributes

current_row_cache_size  [RW]  A byte counter of many bytes of row data have already been cached
digest  [RW]  The current Digest
last_row  [RW]  nil if the last run of the checksum method left no unprocessed row. Otherwise the left over row of that checksum run
max_row_cache_size  [RW]  The maximum total size (in bytes) up to which rows will be cached
row_cache  [RW]  A hash of cached rows consisting of row checksum => row dump pairs.
row_checksums  [RW]  Returns an array of checksums for each encounters row. Each array element is a Hash with the following elements:
  • +:row_keys+: A primary key => value hash identifying the row
  • +:checksum+: the checksum for this row

Public Class methods

Creates a new cursor

  • session: the current proxy session
  • table: table_name

Public Instance methods

Calculates the checksum from the current row up to the row specified by options. options is a hash including either

  • :proxy_block_size: The number of rows to scan.
  • :max_row: A row hash of primary key columns specifying the maximum record to scan.

Returns multiple parameters:

  • last row read
  • checksum
  • number of processed records

Returns the current checksum

Returns true if the current cursor has unprocessed rows

Returns the cursor‘s next row

Reinitializes the row checksum array and the total checksum

Returns a hash of row checksum => row dump pairs for the checksums in the provided array

Updates block / row checksums and row cache with the given row.

[Validate]