seamless.checksum_class

Class for Seamless checksums. Seamless checksums are calculated as SHA-256 hashes of buffers.

Checksum

  • kind: class
  • signature: Checksum

Class for Seamless checksums. Seamless checksums are calculated as SHA-256 hashes of buffers.

Checksum.bytes

  • kind: method
  • signature: bytes(self)

Returns the checksum as a 32-byte bytes object

Checksum.decref

  • kind: method
  • signature: decref(self)

Decrement a normal cache ref and return whether one was held.

Checksum.decref_refholder

  • kind: method
  • signature: decref_refholder(self)

Release an internal lifecycle reference for this checksum.

Checksum.find

  • kind: method
  • signature: find(self, verbose)

Returns a list of URL infos to download the underlying buffer. An URL info can be an URL string, or a dict with additional information.

Checksum.fingertip

  • kind: method
  • signature: fingertip(self, celltype)

Resolve locally, or report the highest failure encountered in recovery.

Checksum.fingertip_sync

  • kind: method
  • signature: fingertip_sync(self, celltype)

Synchronously resolve or recompute the checksum buffer/value.

Checksum.hex

  • kind: method
  • signature: hex(self)

Returns the checksum as a 64-byte hexadecimal string

Checksum.incref

  • kind: method
  • signature: incref(self, *, scratch)

Increment normal refcount in the buffer cache.

If scratch is True, keep the ref scratch-only (no remote registration).

Checksum.incref_refholder

  • kind: method
  • signature: incref_refholder(self, *, scratch)

Acquire an internal lifecycle reference for this checksum.

scratch=None is a neutral claim; see BufferCache.incref_refholder.

Checksum.load

  • kind: method
  • signature: load(cls, filename)

Loads the checksum from a .CHECKSUM file.

If the filename doesn't have a .CHECKSUM extension, it is added

Checksum.mark_scratch

  • kind: method
  • signature: mark_scratch(self)

Record a producer's decision that this checksum is scratch. See BufferCache.mark_scratch.

Checksum.resolution

  • kind: method
  • signature: resolution(self, celltype)

Returns the data buffer that corresponds to the checksum. If celltype is provided, a value is returned instead.

Checksum.resolve

  • kind: method
  • signature: resolve(self, celltype)

Returns the data buffer that corresponds to the checksum. If celltype is provided, a value is returned instead.

The buffer is retrieved from buffer cache

Checksum.save

  • kind: method
  • signature: save(self, filename)

Saves the checksum to a .CHECKSUM file.

If the filename doesn't have a .CHECKSUM extension, it is added

Checksum.tempref

  • kind: method
  • signature: tempref(self, interest, fade_factor, fade_interval)

Add or refresh a single tempref. Only one tempref allowed per checksum.

A tempref is always scratch (bounded, ephemeral, no remote registration). To publish this checksum's buffer remotely on a requester's behalf, call transfer_write explicitly.

Checksum.transfer_write

  • kind: method
  • signature: transfer_write(self, buffer)

Publish this checksum's buffer to the remote store (the "transfer write"). See BufferCache.transfer_write for the full contract.

_run_coro_in_new_loop

  • kind: function
  • signature: _run_coro_in_new_loop(coro)

No docstring.

_run_coro_in_worker_thread

  • kind: function
  • signature: _run_coro_in_worker_thread(coro)

No docstring.

validate_checksum

  • kind: function
  • signature: validate_checksum(v)

Validate a checksum, list or dict recursively