vtable_t Class Reference

List of all members.

Detailed Description

Structure for converting lower layer info to a virtual table.

This structure holds a set of vtable_row_t, which is a set of attributes. The space for the whole mess is allocated by the vtable_t, and the rows must be populated strictly in sequence, and the attributes of the rows likewise must be populated in sequence. As a row is populated, space for the attributes is peeled off the chunk allocated by the vtable. The idea here is to create, without undue heap activity, a string-based (untyped) virtual table containing various and sundry information. The things that can be gathered and stuffed into virtual tables include: Info about the threads, transactions. A server could, if it so chose, convert this information into a relational table. Originally this was used to send across the wire, via RPC, this info to a client in client/server SHORE. Now it has been stripped down. Someday if this facility proves useful, we should make this collect typed information so that the attributes can be int or double. But for now, they are string representations of the values.

Test programs may use ss_m::xct_collect(vtable &) and kin, and output the results with the operator<< for vtable_t.

Examples:

vtable_example.cpp.

Definition at line 207 of file vtable.h.

Public Member Functions

NORET vtable_t ()
int init (int R, int A, int S)
NORET ~vtable_t ()
vtable_row_toperator[] (int i) const
ostream & operator<< (ostream &o) const
int quant () const
 Return number of rows filled.
int size () const
void filled_one ()
void back_out (int n)
int realloc ()


Member Function Documentation

int vtable_t::init ( int  R,
int  A,
int  S 
)

Initialize table with R rows, with up to A attributes, each with a maximum size of S bytes.

Definition at line 156 of file vtable.cpp.

References align, vtable_row_t::bytes_required_for(), vtable_row_t::init_for_attributes(), and w_assert1.

Referenced by sthread_t::collect().

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files:
Generated on Wed Jul 7 17:22:43 2010 for Shore Storage Manager by  doxygen 1.4.7