SheafSystem
0.0.0.0
|
Agent responsible for importing and exporting posets from an external name space which resides on disk. More...
#include <storage_agent.h>
Classes | |
class | transaction |
A transaction entity. More... | |
Public Types | |
enum | transaction_type { READ, WRITE, READ_WRITE } |
Type of access associated with a transaction. More... | |
Public Member Functions | |
storage_agent () | |
Default constructor. More... | |
storage_agent (const storage_agent &xother) | |
Copy constructor. More... | |
virtual storage_agent * | clone () const |
Virtual constructor; makes a new instance of the same type as this. More... | |
virtual | ~storage_agent () |
Destructor. More... | |
virtual bool | invariant () const |
Class invariant. More... | |
virtual bool | is_ancestor_of (const any *other) const |
Conformance test; true if other conforms to this. More... | |
storage_agent (const std::string &xfile_name, sheaf_file::access_mode xmode=sheaf_file::READ_WRITE, bool xclobber=true, bool xenable_error_report=false) | |
Creates a storage_agent attached to the file with name xfile_name. Locks the file against deletion, but does not prevent access to the file by other processes. More... | |
sheaf_file & | file () |
The file this is attached to. More... | |
const sheaf_file & | file () const |
The file this is attached to. More... | |
bool | file_is_read_accessible () const |
True if file is open. More... | |
bool | file_is_read_only_accessible () const |
True if file is open with READ_ONLY access. More... | |
bool | file_is_read_write_accessible () const |
True if file is open with READ_WRITE. More... | |
const std::string & | file_id_space_name () const |
The name of the id spaces associated with this file in each poset. More... | |
void | reset_time () |
Reset the start time. Set the start time to the CPU time when this function is called. More... | |
clock_t | time () const |
Return the CPU time between when reset_time() was last called and when this function is called. More... | |
void | read_entire (namespace_poset &xns) |
Reads the namespace xns and all the posets in it. More... | |
void | read_remainder (namespace_poset &xns) |
Reads all members of the namespace that have not already been read. More... | |
void | read (namespace_poset &xns) |
Reads the namespace xns. More... | |
void | write (namespace_poset &xns) |
Writes the namespace xns. More... | |
void | write_entire (namespace_poset &xns) |
Writes the namespace xns and all the posets in it. Rewrites any posets that have already been written. More... | |
void | write_remainder (const namespace_poset &xns) |
Writes all the posets in namespace xns that have not already been written. More... | |
void | read (poset_state_handle &xposet, const poset_bounds_descriptor &xrow_bounds=poset_bounds_descriptor::BOTTOM_TOP, const poset_bounds_descriptor &xcol_bounds=poset_bounds_descriptor::BOTTOM_TOP) |
Reads the portion of poset xposet specified by the row bounds xrow_bounds and the column bounds xcol_bounds. More... | |
void | read_toc (poset_state_handle &xposet) |
Reads the table of contents portion of poset xposet. More... | |
void | read_index (poset_state_handle &xposet) |
Reads the index of poset xposet; that is, it does not read the dof tuples. More... | |
void | read_row_decomposition (poset_state_handle &xposet, const scoped_index &xdecomp_id) |
Reads poset xposet using the row decomposition identified by index xdecomp_id. More... | |
void | write (poset_state_handle &xposet, const poset_bounds_descriptor &xrow_bounds=poset_bounds_descriptor::BOTTOM_TOP, const poset_bounds_descriptor &xcol_bounds=poset_bounds_descriptor::BOTTOM_TOP, bool xretain_read_access=false) |
Executes an independent write-only transaction for the portion of poset xposet defined by the down sets of max_row_member_index and max_col_member_index. If xdownset_filter !=0, deletes the members of the downset of the upper bound, filtered by xdownset_filter. More... | |
void | write_toc (poset_state_handle &xposet, const scoped_index &xtoc_id) |
Writes the portion of poset xposet between the lower bound specified by the subposet with index xtoc_id and upper bound top. Registers xtoc_id as lower bounds of the table of the contents. More... | |
void | write_row_decomposition (poset_state_handle &xposet, const scoped_index &xdecomp_id) |
Writes poset xposet using the row decomposition identified by index xdecomp_id. More... | |
void | write_col_decomposition (poset_state_handle &xposet, const scoped_index &xrow_id, const scoped_index &xdecomp_id) |
Writes the member identified by xrow_id in poset xposet using the column decomposition identified by index xdecomp_id. More... | |
void | write_dof_tuple (const abstract_poset_member &xmbr, const scoped_index &xcol_ub_id, const scoped_index &xdecomp_id) |
Writes the portion of the dof tuple of member xmbr which is in the downset of the schema member identified by xcol_ub_id, which must be a member of column decomposition xdecomp_id. More... | |
void | commit_dof_tuple_transaction (const abstract_poset_member &xmbr, const scoped_index &xcol_ub_id, const scoped_index &xdecomp_id) |
Commits the dof tuple transaction associated with xmbr. More... | |
void | begin_read_transaction (namespace_poset &xns) |
Begins an independent read transaction for the namespace xposet. More... | |
void | begin_read_transaction (poset_state_handle &xposet, const poset_bounds_descriptor &xrow_bounds=poset_bounds_descriptor::BOTTOM_TOP, const poset_bounds_descriptor &xcol_bounds=poset_bounds_descriptor::BOTTOM_TOP) |
Begins an independent read transaction for the portion of poset xposet defined by the down sets of max_row_member_index and max_col_member_index. More... | |
void | begin_read_write_transaction (poset_state_handle &xposet, const poset_bounds_descriptor &xrow_bounds=poset_bounds_descriptor::BOTTOM_TOP, const poset_bounds_descriptor &xcol_bounds=poset_bounds_descriptor::BOTTOM_TOP) |
Begins an independent read-write transaction for the portion of poset xposet defined by the down sets of max_row_member_index and max_col_member_index. Initialize the uncommited (internal) copy from the committed (external) copy of the poset state. More... | |
void | begin_write_transaction (namespace_poset &xns) |
Begins an independent write transaction for the namespace xns. More... | |
void | begin_write_transaction (const poset_state_handle &xposet, const poset_bounds_descriptor &xrow_bounds=poset_bounds_descriptor::BOTTOM_TOP, const poset_bounds_descriptor &xcol_bounds=poset_bounds_descriptor::BOTTOM_TOP) |
Begins an independent write-only transaction for the portion of poset xposet defined by the down sets of max_row_member_index and max_col_member_index. More... | |
void | commit_transaction (poset_state_handle &xposet) |
Commits the uncommitted state, but does not end the transaction or release read access. More... | |
void | end_transaction (poset_state_handle &xposet, bool xcommit=true) |
Ends an independent access transaction. More... | |
int | member_record_buffer_ub () const |
The number of records allocated in a member record buffer during a transaction. More... | |
void | put_member_record_buffer_ub (int xub) |
Sets the number of records allocated in a member record buffer during a transaction. More... | |
size_t | dof_tuple_record_size () const |
OBSOLETE: no longer used. The number of bytes in a dof tuple record The dof tuple records are now automatically sized as follows. For ordinary posets, each record holds an entire dof tuple. For section spaces, each record holds an instance of the fiber type. More... | |
void | put_dof_tuple_record_size (size_t xsize) |
OBSOLETE: no longer used. Sets the number of bytes in a dof_tuple record. More... | |
int | dof_tuple_record_buffer_ub () const |
The number of records allocated in a dof_tuple record buffer during a transaction. Equal to the HDF chunk size. More... | |
void | put_dof_tuple_record_buffer_ub (int xub) |
Sets the number of records allocated in a dof_tuple record buffer during a transaction and hence the HDF chunk size. More... | |
int | transaction_ct () const |
The number of active transactions. More... | |
bool | transaction_is_active (pod_index_type xindex) const |
True if either a read or write transaction is active for poset with index xindex. More... | |
bool | transaction_is_active (const poset_state_handle &xposet) const |
True if either a read or write transaction is active for poset xposet. More... | |
bool | read_transaction_is_active (const poset_state_handle &xposet) const |
True if there is an active read transaction for poset xposet. More... | |
bool | write_transaction_is_active (const poset_state_handle &xposet) const |
True if there is an active write transaction involving the poset with name space index xindex. More... | |
bool | read_write_transaction_is_active (poset_state_handle &xposet) const |
True if both a read-write transaction is active. More... | |
bool | state_is_consistent (const poset_state_handle &xposet) const |
True if uncommitted state is consistent with committed state. More... | |
Public Member Functions inherited from sheaf::any | |
bool | is_same_type (const any *other) const |
True if other is the same type as this. More... | |
virtual | ~any () |
Destructor. More... | |
bool | invariant_check () const |
True if invariant checking is enabled. More... | |
void | enable_invariant_check () const |
Enable invariant checking. More... | |
void | disable_invariant_check () const |
Disable invariant check. Intended for preventing recursive calls to invariant and for suppressing invariant checking during multi-phase initialization. More... | |
int | disable_invariance_check_request_depth () const |
Number of times disable_invariant_check has been called without matching call to enable_invariant_check. More... | |
Static Public Attributes | |
static const bool | COMMIT = true |
Value to indicate transaction should be committed. More... | |
static const bool | ABORT = false |
Value to indicate transaction should not be committed. More... | |
static const bool | RETAIN_READ = true |
Value to indicate read access should be retained. More... | |
static const bool | RELEASE_ALL = false |
Value to indicate read access should not be retained. More... | |
Protected Member Functions | |
void | put_state_is_consistent (poset_state_handle &xposet) |
Sets the state_is_consistent flag for xposet to true. More... | |
void | read_prerequisites (const poset_state_handle &xposet, const poset_bounds_descriptor &xcol_bounds) |
Reads all posets that xposet depends on. More... | |
void | write_prerequisites (const poset_scaffold &xscaffold) |
Writes all posets that xposet depends on. More... | |
void | initialize_poset_id_spaces_for_write (poset_state_handle &xposet) |
Initializes the subposet and dof tuple index spaces for poset xposet. More... | |
void | initialize_namespace_id_spaces_for_read (namespace_poset &xposet) |
Ensures that the namespace and its standard posets have an empty index space for members and no index space for dof tuples. More... | |
void | initialize_namespace_id_spaces_for_write (namespace_poset &xposet) |
Ensures that the namespace and its standard posets have an empty index space for members and no index space for dof tuples. More... | |
void | clear_all_id_spaces (namespace_poset &xns) |
Clears all dof tuple index spaces. More... | |
Protected Member Functions inherited from sheaf::any | |
any () | |
default constructor More... | |
Friends | |
class | poset_scaffold |
class | dof_tuple_record_set |
Agent responsible for importing and exporting posets from an external name space which resides on disk.
Definition at line 74 of file storage_agent.h.
Type of access associated with a transaction.
Definition at line 466 of file storage_agent.h.
sheaf::storage_agent::storage_agent | ( | ) |
Default constructor.
Definition at line 81 of file storage_agent.cc.
Referenced by is_ancestor_of().
sheaf::storage_agent::storage_agent | ( | const storage_agent & | xother | ) |
Copy constructor.
Not Implemented.
Definition at line 117 of file storage_agent.cc.
References clone().
|
virtual |
Destructor.
Definition at line 162 of file storage_agent.cc.
References invariant().
Referenced by clone().
sheaf::storage_agent::storage_agent | ( | const std::string & | xfile_name, |
sheaf_file::access_mode | xmode = sheaf_file::READ_WRITE , |
||
bool | xclobber = true , |
||
bool | xenable_error_report = false |
||
) |
Creates a storage_agent attached to the file with name xfile_name. Locks the file against deletion, but does not prevent access to the file by other processes.
Definition at line 249 of file storage_agent.cc.
References file().
void sheaf::storage_agent::begin_read_transaction | ( | namespace_poset & | xns | ) |
Begins an independent read transaction for the namespace xposet.
Definition at line 1146 of file storage_agent.cc.
References sheaf::read_write_monitor_handle::access_request_depth(), sheaf::poset_state_handle::attach_to_state(), sheaf::namespace_poset::clear(), sheaf::record_set::close(), sheaf::DOWN, sheaf::poset_scaffold::evaluate_toc_alias(), sheaf::poset_state_handle::index(), sheaf::member_record_set::internalize(), sheaf::dof_tuple_record_set::internalize(), sheaf::attributes_record_set::internalize(), sheaf::namespace_poset::name(), sheaf::NOT_STRICT, sheaf::dof_tuple_record_set::open(), sheaf::record_set::open(), sheaf::record_set::poset_name(), sheaf::poset_scaffold::put_member_names_to_poset(), sheaf::namespace_poset::put_name(), sheaf::poset_scaffold::row_bounds(), sheaf::poset_state_handle::standard_member_ct(), sheaf::read_write_monitor_handle::state_is_read_write_accessible(), sheaf::namespace_poset::top(), and sheaf::poset_bounds::ub_id().
Referenced by commit_dof_tuple_transaction().
void sheaf::storage_agent::begin_read_transaction | ( | poset_state_handle & | xposet, |
const poset_bounds_descriptor & | xrow_bounds = poset_bounds_descriptor::BOTTOM_TOP , |
||
const poset_bounds_descriptor & | xcol_bounds = poset_bounds_descriptor::BOTTOM_TOP |
||
) |
Begins an independent read transaction for the portion of poset xposet defined by the down sets of max_row_member_index and max_col_member_index.
Definition at line 1285 of file storage_agent.cc.
References sheaf::read_write_monitor_handle::access_request_depth(), sheaf::poset_state_handle::attach_to_state(), begin_read_write_transaction(), sheaf::poset_state_handle::bound_iterator(), sheaf::record_set::close(), sheaf::poset_scaffold::evaluate_toc_alias(), sheaf::index_iterator::index(), sheaf::poset_state_handle::index(), sheaf::member_record_set::internalize(), sheaf::dof_tuple_record_set::internalize(), sheaf::attributes_record_set::internalize(), sheaf::index_iterator::is_done(), sheaf::poset_state_handle::is_external(), sheaf::namespace_poset::member_poset(), sheaf::poset_state_handle::name(), sheaf::poset_state_handle::name_space(), sheaf::index_iterator::next(), sheaf::dof_tuple_record_set::open(), sheaf::record_set::open(), sheaf::poset_scaffold::put_member_names_to_poset(), sheaf::poset_state_handle::release_access(), and sheaf::poset_scaffold::row_bounds().
void sheaf::storage_agent::begin_read_write_transaction | ( | poset_state_handle & | xposet, |
const poset_bounds_descriptor & | xrow_bounds = poset_bounds_descriptor::BOTTOM_TOP , |
||
const poset_bounds_descriptor & | xcol_bounds = poset_bounds_descriptor::BOTTOM_TOP |
||
) |
Begins an independent read-write transaction for the portion of poset xposet defined by the down sets of max_row_member_index and max_col_member_index. Initialize the uncommited (internal) copy from the committed (external) copy of the poset state.
Definition at line 1433 of file storage_agent.cc.
References begin_write_transaction().
Referenced by begin_read_transaction().
void sheaf::storage_agent::begin_write_transaction | ( | namespace_poset & | xns | ) |
Begins an independent write transaction for the namespace xns.
Definition at line 1470 of file storage_agent.cc.
References sheaf::read_write_monitor_handle::state_is_read_write_accessible().
Referenced by begin_read_write_transaction().
void sheaf::storage_agent::begin_write_transaction | ( | const poset_state_handle & | xposet, |
const poset_bounds_descriptor & | xrow_bounds = poset_bounds_descriptor::BOTTOM_TOP , |
||
const poset_bounds_descriptor & | xcol_bounds = poset_bounds_descriptor::BOTTOM_TOP |
||
) |
Begins an independent write-only transaction for the portion of poset xposet defined by the down sets of max_row_member_index and max_col_member_index.
Definition at line 1502 of file storage_agent.cc.
References commit_transaction(), sheaf::abstract_poset_member::ge(), sheaf::poset_state_handle::is_attached(), sheaf::poset_state_handle::schema(), sheaf::read_write_monitor_handle::state_is_read_accessible(), sheaf::poset_bounds_descriptor::ub_id(), and sheaf::poset_bounds_descriptor::ub_member_is_not_top().
|
protected |
Clears all dof tuple index spaces.
Definition at line 2253 of file storage_agent.cc.
References sheaf::index_space_family::contains(), sheaf::poset_state_handle::dof_tuple_id_spaces(), sheaf::DOWN, sheaf::poset_state_handle::get_read_write_access(), initialize_namespace_id_spaces_for_read(), sheaf::poset_state_handle::is_external(), sheaf::poset_state_handle::member_id_spaces(), sheaf::namespace_poset::member_poset(), sheaf::NOT_STRICT, sheaf::poset_state_handle::powerset(), sheaf::poset_state_handle::release_access(), sheaf::read_write_monitor_handle::state_is_read_write_accessible(), sheaf::poset_state_handle::subposet_id_spaces(), sheaf::poset_state_handle::table(), and sheaf::namespace_poset::top().
Referenced by initialize_poset_id_spaces_for_write().
|
virtual |
Virtual constructor; makes a new instance of the same type as this.
Not Implemented.
Reimplemented from sheaf::any.
Definition at line 136 of file storage_agent.cc.
References ~storage_agent().
Referenced by storage_agent().
void sheaf::storage_agent::commit_dof_tuple_transaction | ( | const abstract_poset_member & | xmbr, |
const scoped_index & | xcol_ub_id, | ||
const scoped_index & | xdecomp_id | ||
) |
Commits the dof tuple transaction associated with xmbr.
Definition at line 1038 of file storage_agent.cc.
References begin_read_transaction(), sheaf::poset_dof_map::class_name(), sheaf::record_set::close(), sheaf::dof_tuple_record_set::compute_ext_id(), sheaf::abstract_poset_member::dof_map(), sheaf::poset_scaffold::dof_tuple_class_names(), sheaf::poset_scaffold::dof_tuple_ext_id(), sheaf::abstract_poset_member::dof_tuple_id(), sheaf::poset_scaffold::dof_tuple_types(), sheaf::poset_scaffold::evaluate_toc_alias(), sheaf::dof_tuple_record_set::externalize_domain(), sheaf::poset_component::host(), sheaf::scoped_index::is_valid(), sheaf::dof_tuple_record_set::open(), sheaf::scoped_index::pod(), sheaf::read_write_monitor_handle::state_is_read_write_accessible(), and sheaf::poset_dof_map::type_id().
Referenced by write_dof_tuple().
void sheaf::storage_agent::commit_transaction | ( | poset_state_handle & | xposet | ) |
Commits the uncommitted state, but does not end the transaction or release read access.
Definition at line 1536 of file storage_agent.cc.
References sheaf::poset_state_handle::bound_iterator(), sheaf::record_set::close(), end_transaction(), sheaf::poset_scaffold::evaluate_toc_alias(), sheaf::dof_tuple_record_set::externalize(), sheaf::member_record_set::externalize(), sheaf::attributes_record_set::externalize(), sheaf::poset_scaffold::get_member_names_from_poset(), sheaf::index_iterator::index(), sheaf::index_iterator::is_done(), sheaf::poset_state_handle::name(), sheaf::index_iterator::next(), sheaf::dof_tuple_record_set::open(), sheaf::record_set::open(), sheaf::poset_scaffold::row_bounds(), and sheaf::read_write_monitor_handle::state_is_read_accessible().
Referenced by begin_write_transaction().
int sheaf::storage_agent::dof_tuple_record_buffer_ub | ( | ) | const |
The number of records allocated in a dof_tuple record buffer during a transaction. Equal to the HDF chunk size.
Definition at line 1754 of file storage_agent.cc.
References put_dof_tuple_record_buffer_ub().
Referenced by put_dof_tuple_record_size().
size_t sheaf::storage_agent::dof_tuple_record_size | ( | ) | const |
OBSOLETE: no longer used. The number of bytes in a dof tuple record The dof tuple records are now automatically sized as follows. For ordinary posets, each record holds an entire dof tuple. For section spaces, each record holds an instance of the fiber type.
Definition at line 1726 of file storage_agent.cc.
References put_dof_tuple_record_size().
Referenced by put_member_record_buffer_ub().
void sheaf::storage_agent::end_transaction | ( | poset_state_handle & | xposet, |
bool | xcommit = true |
||
) |
Ends an independent access transaction.
Definition at line 1654 of file storage_agent.cc.
References sheaf::read_write_monitor_handle::access_request_depth(), and member_record_buffer_ub().
Referenced by commit_transaction().
sheaf::sheaf_file & sheaf::storage_agent::file | ( | ) |
The file this is attached to.
Definition at line 307 of file storage_agent.cc.
Referenced by storage_agent().
const sheaf::sheaf_file & sheaf::storage_agent::file | ( | ) | const |
The file this is attached to.
Definition at line 317 of file storage_agent.cc.
References file_is_read_accessible().
const std::string & sheaf::storage_agent::file_id_space_name | ( | ) | const |
The name of the id spaces associated with this file in each poset.
Definition at line 396 of file storage_agent.cc.
References reset_time().
Referenced by file_is_read_write_accessible().
bool sheaf::storage_agent::file_is_read_accessible | ( | ) | const |
True if file is open.
Definition at line 327 of file storage_agent.cc.
References file_is_read_only_accessible().
Referenced by file().
bool sheaf::storage_agent::file_is_read_only_accessible | ( | ) | const |
True if file is open with READ_ONLY access.
Definition at line 351 of file storage_agent.cc.
References file_is_read_write_accessible().
Referenced by file_is_read_accessible().
bool sheaf::storage_agent::file_is_read_write_accessible | ( | ) | const |
True if file is open with READ_WRITE.
Definition at line 375 of file storage_agent.cc.
References file_id_space_name().
Referenced by file_is_read_only_accessible().
|
protected |
Ensures that the namespace and its standard posets have an empty index space for members and no index space for dof tuples.
Definition at line 2330 of file storage_agent.cc.
References initialize_namespace_id_spaces_for_write(), sheaf::interval_index_space_handle::insert_interval(), sheaf::poset_state_handle::member_id_spaces(), sheaf::namespace_poset::namespace_schema(), sheaf::namespace_poset::primitives(), sheaf::namespace_poset::primitives_schema(), sheaf::poset_state_handle::standard_member_ct(), and sheaf::read_write_monitor_handle::state_is_read_write_accessible().
Referenced by clear_all_id_spaces().
|
protected |
Ensures that the namespace and its standard posets have an empty index space for members and no index space for dof tuples.
Definition at line 2401 of file storage_agent.cc.
References sheaf::storage_agent::transaction::operator<(), and sheaf::read_write_monitor_handle::state_is_read_write_accessible().
Referenced by initialize_namespace_id_spaces_for_read().
|
protected |
Initializes the subposet and dof tuple index spaces for poset xposet.
Definition at line 2185 of file storage_agent.cc.
References sheaf::gathered_insertion_index_space_handle::clear(), clear_all_id_spaces(), sheaf::index_space_family::contains(), sheaf::poset_state_handle::dof_tuple_id_spaces(), sheaf::poset_state_handle::member_id_spaces(), sheaf::explicit_index_space_handle::release_id_space(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and sheaf::poset_state_handle::subposet_id_spaces().
Referenced by write_prerequisites().
|
virtual |
Class invariant.
Reimplemented from sheaf::any.
Definition at line 187 of file storage_agent.cc.
References is_ancestor_of().
Referenced by ~storage_agent().
|
virtual |
Conformance test; true if other conforms to this.
Reimplemented from sheaf::any.
Definition at line 222 of file storage_agent.cc.
References storage_agent().
Referenced by invariant().
int sheaf::storage_agent::member_record_buffer_ub | ( | ) | const |
The number of records allocated in a member record buffer during a transaction.
Definition at line 1695 of file storage_agent.cc.
References put_member_record_buffer_ub().
Referenced by end_transaction().
void sheaf::storage_agent::put_dof_tuple_record_buffer_ub | ( | int | xub | ) |
Sets the number of records allocated in a dof_tuple record buffer during a transaction and hence the HDF chunk size.
Definition at line 1762 of file storage_agent.cc.
References transaction_ct().
Referenced by dof_tuple_record_buffer_ub().
void sheaf::storage_agent::put_dof_tuple_record_size | ( | size_t | xsize | ) |
OBSOLETE: no longer used. Sets the number of bytes in a dof_tuple record.
Definition at line 1734 of file storage_agent.cc.
References dof_tuple_record_buffer_ub().
Referenced by dof_tuple_record_size().
void sheaf::storage_agent::put_member_record_buffer_ub | ( | int | xub | ) |
Sets the number of records allocated in a member record buffer during a transaction.
Definition at line 1704 of file storage_agent.cc.
References dof_tuple_record_size().
Referenced by member_record_buffer_ub().
|
protected |
Sets the state_is_consistent flag for xposet to true.
Definition at line 1994 of file storage_agent.cc.
References sheaf::read_write_monitor_handle::clear_state_is_modified(), sheaf::poset_state_handle::is_attached(), and read_prerequisites().
Referenced by state_is_consistent().
void sheaf::storage_agent::read | ( | namespace_poset & | xns | ) |
Reads the namespace xns.
Definition at line 531 of file storage_agent.cc.
References sheaf::read_write_monitor_handle::access_request_depth(), sheaf::read_write_monitor_handle::state_is_read_write_accessible(), and write().
Referenced by read_remainder(), and write_remainder().
void sheaf::storage_agent::read | ( | poset_state_handle & | xposet, |
const poset_bounds_descriptor & | xrow_bounds = poset_bounds_descriptor::BOTTOM_TOP , |
||
const poset_bounds_descriptor & | xcol_bounds = poset_bounds_descriptor::BOTTOM_TOP |
||
) |
Reads the portion of poset xposet specified by the row bounds xrow_bounds and the column bounds xcol_bounds.
require(xposet.is_external()); ///
Definition at line 693 of file storage_agent.cc.
References sheaf::read_write_monitor_handle::access_request_depth(), sheaf::poset_state_handle::is_external(), and read_toc().
void sheaf::storage_agent::read_entire | ( | namespace_poset & | xns | ) |
Reads the namespace xns and all the posets in it.
Definition at line 452 of file storage_agent.cc.
References sheaf::read_write_monitor_handle::access_request_depth(), read_remainder(), and sheaf::read_write_monitor_handle::state_is_read_write_accessible().
Referenced by time().
void sheaf::storage_agent::read_index | ( | poset_state_handle & | xposet | ) |
Reads the index of poset xposet; that is, it does not read the dof tuples.
Definition at line 752 of file storage_agent.cc.
References sheaf::read_write_monitor_handle::access_request_depth(), sheaf::poset_state_handle::is_external(), and read_row_decomposition().
Referenced by read_toc().
|
protected |
Reads all posets that xposet depends on.
Definition at line 2016 of file storage_agent.cc.
References sheaf::poset_state_handle::get_read_access(), sheaf::poset_state_handle::index(), sheaf::poset_state_handle::is_external(), sheaf::is_valid(), sheaf::poset_state_handle::name(), sheaf::abstract_poset_member::name(), sheaf::poset_state_handle::name_space(), sheaf::PREREQ_IDS_UB, sheaf::read_write_monitor_handle::state_is_read_write_accessible(), and write_prerequisites().
Referenced by put_state_is_consistent().
void sheaf::storage_agent::read_remainder | ( | namespace_poset & | xns | ) |
Reads all members of the namespace that have not already been read.
Definition at line 487 of file storage_agent.cc.
References sheaf::read_write_monitor_handle::access_request_depth(), sheaf::DOWN, sheaf::poset_state_handle::is_external(), sheaf::poset_state_handle::member_name(), sheaf::namespace_poset::member_poset(), sheaf::NOT_STRICT, read(), sheaf::read_write_monitor_handle::state_is_read_write_accessible(), and sheaf::namespace_poset::top().
Referenced by read_entire().
void sheaf::storage_agent::read_row_decomposition | ( | poset_state_handle & | xposet, |
const scoped_index & | xdecomp_id | ||
) |
Reads poset xposet using the row decomposition identified by index xdecomp_id.
Definition at line 779 of file storage_agent.cc.
References sheaf::read_write_monitor_handle::access_request_depth(), sheaf::scoped_index::hub_pod(), sheaf::poset_state_handle::is_external(), and write().
Referenced by read_index().
void sheaf::storage_agent::read_toc | ( | poset_state_handle & | xposet | ) |
Reads the table of contents portion of poset xposet.
Definition at line 723 of file storage_agent.cc.
References sheaf::read_write_monitor_handle::access_request_depth(), sheaf::poset_state_handle::is_external(), and read_index().
Referenced by read().
bool sheaf::storage_agent::read_transaction_is_active | ( | const poset_state_handle & | xposet | ) | const |
True if there is an active read transaction for poset xposet.
Definition at line 1860 of file storage_agent.cc.
Referenced by transaction_is_active().
bool sheaf::storage_agent::read_write_transaction_is_active | ( | poset_state_handle & | xposet | ) | const |
True if both a read-write transaction is active.
Definition at line 1910 of file storage_agent.cc.
References state_is_consistent().
void sheaf::storage_agent::reset_time | ( | ) |
Reset the start time. Set the start time to the CPU time when this function is called.
Definition at line 403 of file storage_agent.cc.
References time().
Referenced by file_id_space_name().
bool sheaf::storage_agent::state_is_consistent | ( | const poset_state_handle & | xposet | ) | const |
True if uncommitted state is consistent with committed state.
Definition at line 1934 of file storage_agent.cc.
References sheaf::index_space_family::contains(), sheaf::poset_state_handle::dof_tuple_id_spaces(), sheaf::poset_state_handle::is_attached(), sheaf::index_space_family::is_empty(), sheaf::poset_state_handle::member_id_spaces(), put_state_is_consistent(), sheaf::read_write_monitor_handle::state_is_modified(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and sheaf::poset_state_handle::subposet_id_spaces().
Referenced by read_write_transaction_is_active().
clock_t sheaf::storage_agent::time | ( | ) | const |
Return the CPU time between when reset_time() was last called and when this function is called.
Definition at line 421 of file storage_agent.cc.
References ABORT, COMMIT, read_entire(), RELEASE_ALL, and RETAIN_READ.
Referenced by reset_time().
int sheaf::storage_agent::transaction_ct | ( | ) | const |
The number of active transactions.
Definition at line 1786 of file storage_agent.cc.
References transaction_is_active().
Referenced by put_dof_tuple_record_buffer_ub().
bool sheaf::storage_agent::transaction_is_active | ( | pod_index_type | xindex | ) | const |
True if either a read or write transaction is active for poset with index xindex.
Definition at line 1810 of file storage_agent.cc.
Referenced by sheaf::storage_agent::transaction::transaction(), and transaction_ct().
bool sheaf::storage_agent::transaction_is_active | ( | const poset_state_handle & | xposet | ) | const |
True if either a read or write transaction is active for poset xposet.
Definition at line 1835 of file storage_agent.cc.
References read_transaction_is_active().
void sheaf::storage_agent::write | ( | namespace_poset & | xns | ) |
Writes the namespace xns.
Definition at line 563 of file storage_agent.cc.
References sheaf::poset_state_handle::index(), sheaf::poset_state_handle::is_attached(), sheaf::scoped_index::is_valid(), sheaf::read_write_monitor_handle::state_is_read_write_accessible(), and write_entire().
Referenced by read(), and read_row_decomposition().
void sheaf::storage_agent::write | ( | poset_state_handle & | xposet, |
const poset_bounds_descriptor & | xrow_bounds = poset_bounds_descriptor::BOTTOM_TOP , |
||
const poset_bounds_descriptor & | xcol_bounds = poset_bounds_descriptor::BOTTOM_TOP , |
||
bool | xretain_read_access = false |
||
) |
Executes an independent write-only transaction for the portion of poset xposet defined by the down sets of max_row_member_index and max_col_member_index. If xdownset_filter !=0, deletes the members of the downset of the upper bound, filtered by xdownset_filter.
Definition at line 815 of file storage_agent.cc.
References sheaf::abstract_poset_member::ge(), sheaf::poset_state_handle::index(), sheaf::poset_state_handle::is_attached(), sheaf::scoped_index::is_valid(), sheaf::poset_state_handle::name(), sheaf::poset_state_handle::schema(), sheaf::read_write_monitor_handle::state_is_read_accessible(), sheaf::poset_bounds_descriptor::ub_id(), sheaf::poset_bounds_descriptor::ub_member_is_not_top(), and write_toc().
void sheaf::storage_agent::write_col_decomposition | ( | poset_state_handle & | xposet, |
const scoped_index & | xrow_id, | ||
const scoped_index & | xdecomp_id | ||
) |
Writes the member identified by xrow_id in poset xposet using the column decomposition identified by index xdecomp_id.
require(xposet.schema().host()->includes_subposet(xdecomp_id));
Definition at line 946 of file storage_agent.cc.
References sheaf::scoped_index::hub_pod(), sheaf::poset_state_handle::is_attached(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and write_dof_tuple().
Referenced by write_row_decomposition().
void sheaf::storage_agent::write_dof_tuple | ( | const abstract_poset_member & | xmbr, |
const scoped_index & | xcol_ub_id, | ||
const scoped_index & | xdecomp_id | ||
) |
Writes the portion of the dof tuple of member xmbr which is in the downset of the schema member identified by xcol_ub_id, which must be a member of column decomposition xdecomp_id.
require(xposet.schema().host()->includes_subposet(xdecomp_id));
Definition at line 993 of file storage_agent.cc.
References commit_dof_tuple_transaction(), sheaf::poset_component::host(), sheaf::scoped_index::hub_pod(), sheaf::poset_component::index(), and sheaf::read_write_monitor_handle::state_is_read_accessible().
Referenced by write_col_decomposition().
void sheaf::storage_agent::write_entire | ( | namespace_poset & | xns | ) |
Writes the namespace xns and all the posets in it. Rewrites any posets that have already been written.
Definition at line 599 of file storage_agent.cc.
References sheaf::poset_state_handle::is_attached(), sheaf::read_write_monitor_handle::state_is_read_write_accessible(), and write_remainder().
Referenced by write().
|
protected |
Writes all posets that xposet depends on.
Definition at line 2091 of file storage_agent.cc.
References sheaf::poset_state_handle::get_read_access(), sheaf::poset_scaffold::index(), initialize_poset_id_spaces_for_write(), sheaf::poset_state_handle::is_external(), sheaf::is_valid(), sheaf::poset_state_handle::name(), sheaf::abstract_poset_member::name(), sheaf::poset_scaffold::name_space(), sheaf::PREREQ_IDS_UB, sheaf::poset_state_handle::release_access(), sheaf::read_write_monitor_handle::state_is_read_accessible(), sheaf::poset_scaffold::structure(), and sheaf::poset_scaffold::structure_is_namespace().
Referenced by read_prerequisites().
void sheaf::storage_agent::write_remainder | ( | const namespace_poset & | xns | ) |
Writes all the posets in namespace xns that have not already been written.
Definition at line 635 of file storage_agent.cc.
References sheaf::DOWN, sheaf::poset_state_handle::get_read_access(), sheaf::poset_state_handle::is_attached(), sheaf::poset_state_handle::is_external(), sheaf::namespace_poset::member_poset(), sheaf::NOT_STRICT, read(), sheaf::poset_state_handle::release_access(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and sheaf::namespace_poset::top().
Referenced by write_entire().
void sheaf::storage_agent::write_row_decomposition | ( | poset_state_handle & | xposet, |
const scoped_index & | xdecomp_id | ||
) |
Writes poset xposet using the row decomposition identified by index xdecomp_id.
Definition at line 913 of file storage_agent.cc.
References sheaf::scoped_index::hub_pod(), sheaf::poset_state_handle::includes_subposet(), sheaf::poset_state_handle::is_attached(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and write_col_decomposition().
Referenced by write_toc().
void sheaf::storage_agent::write_toc | ( | poset_state_handle & | xposet, |
const scoped_index & | xtoc_id | ||
) |
Writes the portion of poset xposet between the lower bound specified by the subposet with index xtoc_id and upper bound top. Registers xtoc_id as lower bounds of the table of the contents.
Definition at line 881 of file storage_agent.cc.
References sheaf::scoped_index::hub_pod(), sheaf::poset_state_handle::includes_subposet(), sheaf::poset_state_handle::is_attached(), sheaf::read_write_monitor_handle::state_is_read_accessible(), and write_row_decomposition().
Referenced by write().
bool sheaf::storage_agent::write_transaction_is_active | ( | const poset_state_handle & | xposet | ) | const |
True if there is an active write transaction involving the poset with name space index xindex.
Definition at line 1885 of file storage_agent.cc.
|
static |
Value to indicate transaction should not be committed.
Definition at line 187 of file storage_agent.h.
Referenced by time().
|
static |
Value to indicate transaction should be committed.
Definition at line 182 of file storage_agent.h.
Referenced by time().
|
static |
Value to indicate read access should not be retained.
Definition at line 197 of file storage_agent.h.
Referenced by time().
|
static |
Value to indicate read access should be retained.
Definition at line 192 of file storage_agent.h.
Referenced by time().