Class: Thingfish::Metastore

Inherits:
Object
  • Object
show all
Extended by:
Pluggability, Strelka::AbstractClass
Includes:
Normalization
Defined in:
lib/thingfish/metastore.rb

Overview

The base class for storage mechanisms used by Thingfish to store its data blobs.

Direct Known Subclasses

Memory

Defined Under Namespace

Classes: Memory

Instance Method Summary collapse

Methods included from Normalization

make_object_id, normalize_key, normalize_keys, normalize_oid

Instance Method Details

#inspectObject

Return a representation of the object as a String suitable for debugging.



38
39
40
41
42
43
44
# File 'lib/thingfish/metastore.rb', line 38

def inspect
  return "#<%p:%#016x %d objects>" % [
    self.class,
    self.object_id * 2,
    self.size
  ]
end

#transactionObject

Provide transactional consistency to the provided block. Concrete metastores should override this if they can implement it. By default it’s a no-op.



49
50
51
# File 'lib/thingfish/metastore.rb', line 49

def transaction
  yield
end