27 class entity_data_bin;
30 class modula_oblongata;
32 class octopus_request_id;
46 class octopus :
public virtual basis::root_object
178 modula_oblongata *_tentacles;
181 int _disallow_removals;
187 filter_list *_filters;
Provides a dynamically resizable ASCII character string.
A very common template for a dynamic array of bytes.
Outcomes describe the state of completion for an operation.
a platform-independent way to acquire random numbers in a specific range.
Stores a set of infotons grouped by the entity that owns them.
An infoton is an individual request parcel with accompanying information.
Provides a way of identifying users of an octopus object.
Identifies requests made on an octopus by users.
Octopus is a design pattern for generalized request processing systems.
entity_data_bin & responses()
allows external access to our set of results.
tentacle * locked_get_tentacle(int indy)
access indy'th tentacle.
void unlock_tentacles()
unlocks the list.
basis::outcome add_tentacle(tentacle *to_add, bool filter=false)
hooks a tentacle in to provide processing of one type of infoton.
void periodic_cleaning()
flushes any abandoned data from the response bin.
tentacle * lock_tentacle(const structures::string_array &tentacle_name)
locates the tentacle with the "tentacle_name" and returns it.
int locked_tentacle_count()
number of tentacles.
infoton * acquire_result(const octopus_entity &requester, octopus_request_id &original_id)
acquires responses to previous requests if there are any waiting.
basis::outcome evaluate(infoton *request, const octopus_request_id &item_id, bool now=false)
tries to process the "request" using the current set of tentacles.
void unlock_tentacle(tentacle *to_unlock)
unlocks the octopus when given a previously locked tentacle.
octopus(const basis::astring &name, int max_size_per_entity)
constructs an octopus named "name".
octopus_entity issue_identity()
creates an entity identifier that is unique for this octopus.
infoton * acquire_specific_result(const octopus_request_id &original_id)
supports seeking the result for a specific request.
basis::outcome restore(const structures::string_array &classifier, basis::byte_array &packed_form, infoton *&reformed)
regenerates a packed infoton given its classifier.
basis::outcome zap_tentacle(const structures::string_array &group_name)
similar to remove_tentacle(), but destroys the tentacle.
const basis::astring & name() const
returns the name that the octopus was constructed with.
DEFINE_CLASS_NAME("octopus")
void expunge(const octopus_entity &to_remove)
invokes every tentacle's expunge() method on the id "to_remove".
basis::outcome remove_tentacle(const structures::string_array &group_name, tentacle *&free_me)
removes the tentacle listed for the "group_name", if any.
void lock_tentacles()
locks the tentacle list for use with locked_get_tentacle.
Manages a service within an octopus by processing certain infotons.
Implements a thread-safe roller object.
An array of strings with some additional helpful methods.
Represents a point in time relative to the operating system startup time.
time_locus now()
returns our current locus in the time continuum.