Main Page | Modules | Data Structures | File List | Data Fields

Vital Updates
[State Object Library]


Data Structures

struct  sos_vital_update_t

Typedefs

typedef sos_vital_update_t sos_vital_update_t

Functions

 sos_update_log (long level, sos_vital_update_t *update, apr_pool_t *pool, const char *msg,...)
 sos_update_create (sos_vital_t *vital, sos_status_t *status, apr_pool_t *pool)
 sos_update_execute (const char *addr, const char *name, const char *status, const char *type, const char *note, sul_boolean_t create, apr_hash_t *properties, sos_fs_txn_t *txn, apr_pool_t *pool)

Function Documentation

sos_update_create sos_vital_t vital,
sos_status_t *  status,
apr_pool_t *  pool
 

Creates a new vital update object. Normally this is all handled internally and others need only invoke the sos_update_execute method. This is exposed just in the case that some people need to customize the process any. It's also useful when you already have the necessary objects.

Parameters:
vital Vital that is being updated.
status Status that the Vital is being updated to.
pool Pool, for memory overhead.
Returns:

sos_update_execute const char *  addr,
const char *  name,
const char *  status,
const char *  type,
const char *  note,
sul_boolean_t  create,
apr_hash_t *  properties,
sos_fs_txn_t txn,
apr_pool_t *  pool
 

Parameters:
addr Address of the node that the vital we're updating resides on, this node MUST be in the database, or an error will occur.
name Name of the vital being updated.
status Status of the vital that it's being updated to.
type Type of the vital, for classifying and grouping purposes.
note Vital note, which gives a brief description of how this Vital is doing and provides any other details that are useful in determining why it's in its current status.
create Flag indicating if the vital should be created if it doesn't already exist in the database. This flag will almost always be true.
properties Hash table properties that are passed on to the hooks functions. Extension modules are given a change to populate this table so that extra data related to their operation can be made available during processing from their hooks.
txn Database transaction to perform the update over.
pool Pool, for allocating memory overhead.
Returns:
An sul_error_t instance if an error occured and NULL otherwise.

sos_update_log long  level,
sos_vital_update_t *  update,
apr_pool_t *  pool,
const char *  msg,
... 
 

Writes a log message that's related to this particular vital sign update, so that we can tag the message with useful information and never have to worry about changing that information whenever we need to log a message. This keeps those log messages consistent. We generally include the node, vital name, and state information for the vital sign in the log messages.

Parameters:
level Logging level to send the log message out as. More frequently generated messages should have increasingly higher levels.
update Vital update that the message is being generated from.
pool Pool, for memory overhead.
msg Format string for log message.


Generated on Wed Apr 28 09:38:38 2004 for State by doxygen 1.3.5