|
Zero
0.1.0
|
Store creation/destroy/query interface. More...
#include <stnode_page.h>
Public Member Functions | |
| stnode_cache_t (bool virgin) | |
| PageID | get_root_pid (StoreID store) const |
| lsn_t | get_root_elmsn (StoreID store) const |
| bool | is_allocated (StoreID store) const |
| stnode_t | get_stnode (StoreID store) const |
| Make a copy of the entire stnode_t of the given store. More... | |
| void | get_used_stores (std::vector< StoreID > &) const |
| Returns the StoreID of all allocated stores in the volume. More... | |
| rc_t | sx_create_store (PageID root_pid, StoreID &snum) const |
| rc_t | sx_append_extent (StoreID store, extent_id_t ext) const |
| void | dump (std::ostream &out) const |
| extent_id_t | get_last_extent (StoreID stid) const |
Private Member Functions | |
| StoreID | get_min_unused_stid (stnode_page *spage) const |
Store creation/destroy/query interface.
This object handles store create/destroy/query requests for one volume. 99.99% of the requests are, of course, querying the root page ID of indexes. This object does a lightweight synchronization (latch) to protect them from MT accesses. However, this object doesn't use locks because we don't need them. If the store is being destroyed, ss_m will check intent locks before calling this object, so we are safe.
This object and vol_t replace the "directory" thingies in original Shore-MT with more efficiency and simplicity.
| stnode_cache_t::stnode_cache_t | ( | bool | virgin | ) |
| void stnode_cache_t::dump | ( | std::ostream & | out | ) | const |
| extent_id_t stnode_cache_t::get_last_extent | ( | StoreID | stid | ) | const |
|
private |
Returns the first StoreID that can be used for a new store in this volume or stnode_page::max if all available stores of this volume are already allocated.
Returns the root page ID of the given store. If that store isn't allocated, returns 0.
| [in] | store | Store ID. |
Make a copy of the entire stnode_t of the given store.
| void stnode_cache_t::get_used_stores | ( | std::vector< StoreID > & | ret | ) | const |
Returns the StoreID of all allocated stores in the volume.
| bool stnode_cache_t::is_allocated | ( | StoreID | store | ) | const |
| rc_t stnode_cache_t::sx_append_extent | ( | StoreID | store, |
| extent_id_t | ext | ||
| ) | const |
1.8.12