Class Store
In: lib/storage/store.rb
Parent: Object
Store
TopLevel

The Store class is an abstract class defining the methods needed to access a data store

Methods

check   close   delete   each   get   getid   inspect   makenoswap   makeswap   mark   new   put   save   stats  

Public Class methods

Construct store

return
Handle to the store

Public Instance methods

Check if an object is in the database by its id.

oid
is the id to use in the search.
return
true or false

Close the store

return
Undefined.

Deletes an object from the database.

oid
is the id to to be deleted.
return
Undefined.

Iterate through all objects

yield
Each object in database to block of caller.

Finds an object in the database by its id.

oid
is the id to use in the search.
return
Handle to the object or nil.

Fetch the next available id.

return
An id.

inspect the store cache (only for caches)

return
Undefined.

Marks an object nonswappable

oid
is the object id
return
undefined

Marks an object swappable

oid
is the object id
return
undefined

Marks an object dirty

oid
is the id to use in the search.
return
undefined

Adds a new object to the database.

obj
is a reference to object to be added
return
Undefined.

Save or flush the store to disk

return
Undefined.

produces a statistical report of the database

return
a string containing the report

[Validate]