feisty meow concerns codebase
2.140
|
Stores a set of infotons grouped by the entity that owns them. More...
#include <entity_data_bin.h>
Public Member Functions | |
entity_data_bin (int max_bytes_per_entity) | |
allows each entity in the bin to have "max_bytes_per_entity" bytes stored. More... | |
virtual | ~entity_data_bin () |
DEFINE_CLASS_NAME ("entity_data_bin") | |
int | max_bytes_per_entity () const |
void | max_bytes_per_entity (int max_bytes_per) |
int | entities () const |
int | items_held () const |
bool | get_sizes (const octopus_entity &id, int &items, int &bytes) |
bool | add_item (infoton *to_add, const octopus_request_id &id) |
infoton * | acquire_for_identifier (const octopus_request_id &id) |
infoton * | acquire_for_entity (const octopus_entity &requester, octopus_request_id &id) |
int | acquire_for_entity (const octopus_entity &requester, infoton_list &items, int maximum_size) |
infoton * | acquire_for_any (octopus_request_id &id) |
basis::astring | text_form () const |
void | clean_out_deadwood (int decay_interval=4 *basis::MINUTE_ms) |
Friends | |
class | monk_the_detective |
Stores a set of infotons grouped by the entity that owns them.
Definition at line 36 of file entity_data_bin.h.
octopi::entity_data_bin::entity_data_bin | ( | int | max_bytes_per_entity | ) |
allows each entity in the bin to have "max_bytes_per_entity" bytes stored.
any storage attempts that would go beyond that limit are rejected.
Definition at line 149 of file entity_data_bin.cpp.
|
virtual |
Definition at line 157 of file entity_data_bin.cpp.
References basis::WHACK().
infoton * octopi::entity_data_bin::acquire_for_any | ( | octopus_request_id & | id | ) |
Definition at line 272 of file entity_data_bin.cpp.
References octopi::any_item_applier(), DUMP_STATE, FUNCDEF, GRAB_LOCK, LOG, NULL_POINTER, and basis::WHACK().
int octopi::entity_data_bin::acquire_for_entity | ( | const octopus_entity & | requester, |
infoton_list & | items, | ||
int | maximum_size | ||
) |
Definition at line 303 of file entity_data_bin.cpp.
References acquire_for_entity(), structures::amorph< contents >::append(), FUNCDEF, basis::KILOBYTE, octopi::infoton::packed_size(), and structures::amorph< contents >::reset().
infoton * octopi::entity_data_bin::acquire_for_entity | ( | const octopus_entity & | requester, |
octopus_request_id & | id | ||
) |
Definition at line 325 of file entity_data_bin.cpp.
References DUMP_STATE, FUNCDEF, GRAB_LOCK, LOG, octopi::octopus_entity::mangled_form(), and NULL_POINTER.
Referenced by acquire_for_entity(), octopi::octopus::acquire_result(), and octopi::octopus::expunge().
infoton * octopi::entity_data_bin::acquire_for_identifier | ( | const octopus_request_id & | id | ) |
Definition at line 362 of file entity_data_bin.cpp.
References DUMP_STATE, FUNCDEF, GRAB_LOCK, LOG, and NULL_POINTER.
Referenced by octopi::octopus::acquire_specific_result().
bool octopi::entity_data_bin::add_item | ( | infoton * | to_add, |
const octopus_request_id & | id | ||
) |
Definition at line 219 of file entity_data_bin.cpp.
References octopi::octopus_request_id::_entity, FUNCDEF, GRAB_LOCK, LOG, octopi::infoton::packed_size(), and basis::WHACK().
Referenced by octopi::tentacle::store_product().
void octopi::entity_data_bin::clean_out_deadwood | ( | int | decay_interval = 4 * basis::MINUTE_ms | ) |
Definition at line 448 of file entity_data_bin.cpp.
References octopi::cleaning_applier(), FUNCDEF, basis::astring::get(), GRAB_LOCK, and LOG.
Referenced by octopi::octopus::periodic_cleaning().
octopi::entity_data_bin::DEFINE_CLASS_NAME | ( | "entity_data_bin" | ) |
int octopi::entity_data_bin::entities | ( | ) | const |
Definition at line 163 of file entity_data_bin.cpp.
References GRAB_LOCK.
bool octopi::entity_data_bin::get_sizes | ( | const octopus_entity & | id, |
int & | items, | ||
int & | bytes | ||
) |
Definition at line 472 of file entity_data_bin.cpp.
References FUNCDEF, and GRAB_LOCK.
Referenced by cromp::cromp_server::get_sizes().
|
inline |
Definition at line 59 of file entity_data_bin.h.
|
inline |
Definition at line 47 of file entity_data_bin.h.
Referenced by octopi::tentacle::enqueue(), and cromp::cromp_common::max_bytes_per_entity().
|
inline |
Definition at line 49 of file entity_data_bin.h.
astring octopi::entity_data_bin::text_form | ( | ) | const |
Definition at line 179 of file entity_data_bin.cpp.
References GRAB_LOCK, and octopi::text_form_applier().
Referenced by octopi::recursive_file_copy::copy_hierarchy(), cromp::cromp_common::responses_text_form(), and cromp::cromp_server::responses_text_form().
|
friend |
Definition at line 116 of file entity_data_bin.h.