Struct
CamelObjectBag
Functions
camel_object_bag_new
Returns a new object bag. Object bags are keyed hash tables of objects
that can be updated atomically using transaction semantics. Use
camel_object_bag_destroy() to free the object bag.
Instance methods
camel_object_bag_add
Adds object to bag. The key MUST have been previously reserved using camel_object_bag_reserve().
camel_object_bag_destroy
Frees bag. As a precaution, the function will emit a warning to standard
error and return without freeing bag if bag still has reserved keys.
camel_object_bag_get
Lookup an object by key. If the key is currently reserved, the function
will block until another thread commits or aborts the reservation. The
caller owns the reference to the returned object. Use g_object_unref ()
to unreference it.
camel_object_bag_list
Returns a GPtrArray of all the objects in the bag. The caller owns
both the array and the object references, so to free the array use:.
camel_object_bag_peek
Returns the object for key in bag, ignoring any reservations. If it
isn’t committed, then it isn’t considered. This should only be used
where reliable transactional-based state is not required.
camel_object_bag_reserve
Reserves key in bag. If key is already reserved in another thread,
then wait until the reservation has been committed.