octopi::entity_data_bin Class Reference

Stores a set of infotons grouped by the entity that owns them. More...

#include <entity_data_bin.h>

Collaboration diagram for octopi::entity_data_bin:
Collaboration graph
[legend]

List of all members.

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)
infotonacquire_for_identifier (const octopus_request_id &id)
infotonacquire_for_entity (const octopus_entity &requester, octopus_request_id &id)
int acquire_for_entity (const octopus_entity &requester, infoton_list &items, int maximum_size)
infotonacquire_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

Detailed Description

Stores a set of infotons grouped by the entity that owns them.

Definition at line 36 of file entity_data_bin.h.


Constructor & Destructor Documentation

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().


Member Function Documentation

infoton * octopi::entity_data_bin::acquire_for_any ( octopus_request_id id  ) 
int octopi::entity_data_bin::acquire_for_entity ( const octopus_entity requester,
infoton_list items,
int  maximum_size 
)
infoton * octopi::entity_data_bin::acquire_for_entity ( const octopus_entity requester,
octopus_request_id id 
)
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 
)
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]
astring octopi::entity_data_bin::text_form (  )  const

Friends And Related Function Documentation

friend class monk_the_detective [friend]

Definition at line 116 of file entity_data_bin.h.


The documentation for this class was generated from the following files:
Generated on Sat Jan 28 04:25:44 2012 for hoople2 project by  doxygen 1.6.3