Class: Thingfish::Datastore

Inherits:
Object
  • Object
show all
Extended by:
Pluggability, Strelka::AbstractClass
Includes:
Enumerable, Normalization
Defined in:
lib/thingfish/datastore.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.



40
41
42
43
44
45
# File 'lib/thingfish/datastore.rb', line 40

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

#transactionObject

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



50
51
52
# File 'lib/thingfish/datastore.rb', line 50

def transaction
	yield
end