25 class entity_data_bin;
29 class octopus_request_id;
35 class tentacle :
public virtual basis::root_object
65 OKAY = basis::common::OKAY,
177 pod_motivator *_action;
A very common template for a dynamic array of bytes.
Outcomes describe the state of completion for an operation.
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.
Manages a service within an octopus by processing certain infotons.
bool store_product(infoton *product, const octopus_request_id &original_id)
used by tentacles to store the objects they produce from infotons.
virtual basis::outcome consume(infoton &to_chow, const octopus_request_id &item_id, basis::byte_array &transformed)=0
this is the main function that processes infotons for this tentacle.
basis::outcome enqueue(infoton *to_chow, const octopus_request_id &item_id)
holds onto infotons coming from the octopus for backgrounding.
bool backgrounding() const
reports on whether this tentacle supports background operation or not.
const structures::string_array & group() const
returns the name of the group that this tentacle services.
virtual basis::outcome reconstitute(const structures::string_array &classifier, basis::byte_array &packed_form, infoton *&reformed)=0
regenerates an infoton from its packed form.
static const char * outcome_name(const basis::outcome &to_name)
returns the textual form of the outcome "to_name".
void detach_storage()
unhooks the storage bin from this tentacle.
DEFINE_CLASS_NAME("tentacle")
virtual void expunge(const octopus_entity &to_remove)=0
called to remove traces of the entity "to_remove".
int motivational_rate() const
returns the background processing rate this was constructed with.
@ PARTIAL
processing of request is partially done.
@ ENCRYPTION_MISMATCH
there is a disconnect regarding encryption.
@ NO_HANDLER
no handler for that type of infoton.
void attach_storage(entity_data_bin &storage)
used when a tentacle is being integrated with an octopus.
infoton * next_request(octopus_request_id &item_id)
pops out the next queued request for processing.
entity_data_bin * get_storage()
returns the current pointer, which might be nil.
void propel_arm()
invoked by our thread to cause requests to be processed.
tentacle(const structures::string_array &group_name, bool backgrounded, int motivational_rate=tentacle::DEFAULT_RATE)
constructs a tentacle that handles infotons with the "group_name".
An array of strings with some additional helpful methods.