Package bw :: Package poseidon :: Module indexoceanserver :: Class IndexOcean
[frames] | no frames]

Class IndexOcean

                object --+    
                         |    
ioengine.PersistenceEngine --+
                             |
                            IndexOcean

This class wraps around a regular ocean instance and manages multiple indexes (based on key-types) and makes available functions which take advantage of the indexes.

This frees Poseidon from actually handling index specific activities.

This class takes care of all issues pertaining to transactioning to make sure that Poseidon doesn't have to worry about it

Instance Methods
 
__init__(self, fn, options)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
has_key(self, key)
Do existence checking in indexocean server.
 
load_cache(self)
 
load_index(self)
 
recreate_index(self)
This method recreates the index file - not the index structure in memory
 
slice(self, i, j)
 
__getslice__(self, i, j)
Do a range search using the OOBTree
 
evaluate(self, expression)
Evaluate the expression and return all values in this object where the keys match the expression
 
rexsearch(self, pattern)
Do a regular expression search based on the pattern
 
read_disk(self, key, ttime)
 
commit(self, current_tid, ttime, transaction_data)
 
update_index(self, index_entries)
 
update_rcache(self, ttime, transaction_data)
 
stats(self)
Return useful statistics on the store.

Inherited from ioengine.PersistenceEngine: __repr__, clean_index, close, create, create_snapshot, flush_index, get, get_options, get_r_fp, is_snaphot, mark_index_inconsistent, read, read_header, rollback, upgrade, validate_transaction

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Class Variables

Inherited from ioengine.PersistenceEngine: r_fp

Properties

Inherited from object: __class__

Method Details

__init__(self, fn, options)
(Constructor)

 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

has_key(self, key)

 

Do existence checking in indexocean server. MMAP is one of the most commonly searched stores Doing a search on IndexedSubstringDict is O(m) and in-memory compared to O(log(n)) for doing a search on DiskIndex (index).

Overrides: ioengine.PersistenceEngine.has_key

load_cache(self)

 
Overrides: ioengine.PersistenceEngine.load_cache

load_index(self)

 
Overrides: ioengine.PersistenceEngine.load_index

recreate_index(self)

 

This method recreates the index file - not the index structure in memory

Overrides: ioengine.PersistenceEngine.recreate_index

read_disk(self, key, ttime)

 
Overrides: ioengine.PersistenceEngine.read_disk

commit(self, current_tid, ttime, transaction_data)

 
Overrides: ioengine.PersistenceEngine.commit

stats(self)

 

Return useful statistics on the store.

  • version
  • system endianness
  • storage engine
  • disk data size
  • index data size
  • created time
  • last modification
  • uptime (in seconds)
  • number of items
  • total reads operations
  • cache hits
  • total number of commits
  • tau
  • pack/flush/commit state
Overrides: ioengine.PersistenceEngine.stats
(inherited documentation)