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. | |
| 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.
| octopi::entity_data_bin::~entity_data_bin | ( | ) | [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 273 of file entity_data_bin.cpp.
References octopi::any_item_applier(), DUMP_STATE, FUNCDEF, GRAB_LOCK, LOG, NIL, and basis::WHACK().
| int octopi::entity_data_bin::acquire_for_entity | ( | const octopus_entity & | requester, | |
| infoton_list & | items, | |||
| int | maximum_size | |||
| ) |
Definition at line 304 of file entity_data_bin.cpp.
References acquire_for_entity(), structures::amorph< contents >::append(), 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 326 of file entity_data_bin.cpp.
References DUMP_STATE, FUNCDEF, GRAB_LOCK, LOG, octopi::octopus_entity::mangled_form(), and NIL.
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 363 of file entity_data_bin.cpp.
References DUMP_STATE, FUNCDEF, GRAB_LOCK, LOG, and NIL.
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, GRAB_LOCK, 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 449 of file entity_data_bin.cpp.
References octopi::cleaning_applier(), FUNCDEF, 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 473 of file entity_data_bin.cpp.
References GRAB_LOCK.
Referenced by cromp::cromp_server::get_sizes().
| int octopi::entity_data_bin::items_held | ( | ) | const [inline] |
Definition at line 59 of file entity_data_bin.h.
| void octopi::entity_data_bin::max_bytes_per_entity | ( | int | max_bytes_per | ) | [inline] |
Definition at line 49 of file entity_data_bin.h.
| int octopi::entity_data_bin::max_bytes_per_entity | ( | ) | const [inline] |
Definition at line 47 of file entity_data_bin.h.
Referenced by octopi::tentacle::enqueue(), and cromp::cromp_common::max_bytes_per_entity().
| 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 cromp::cromp_server::responses_text_form(), and cromp::cromp_common::responses_text_form().
friend class monk_the_detective [friend] |
Definition at line 116 of file entity_data_bin.h.
1.6.3