caf_ca/gen_ca

Generic Cloud Assistant.

Source:

Extends

Members

__ca_isCA__ :boolean

Source:

Run-time type information.

Type:
  • boolean

Methods

__ca_destroy__(dataopt, cb)

Source:

Destroys this CA permanently by deleting its checkpointed state.

Destroyed CAs cannot be resumed and input/output queues are immediately discarded.

Parameters:
Name Type Attributes Description
data Object <optional>

An optional hint on how to perform the shutdown.

cb cbType

A callback function to continue after clean-up.

__ca_getAppName__() → {string}

Source:

Returns the application name.

Returns:

The application name.

Type
string

__ca_getName__() → {string}

Source:

Returns the name of this CA.

Returns:

The name of this CA.

Type
string

__ca_isJustCreated__() → {boolean}

Source:

Whether this CA was recently created.

Returns:

True if this CA was recently created.

Type
boolean

__ca_process__(msg, cb)

Source:

Queues a message to be processed by this CA.

Parameters:
Name Type Description
msg Object

A message to be processed.

cb cbType

A callback function to propagate a response to the caller.

__ca_progress__() → {boolean}

Source:
See:
  • cron_ripper

Checks for progress processing messages.

Using this method CAF detects hanged CAs and shuts them down.

Returns:

True if message queue is empty or at least one message was processed since the last call to __ca_progress__.

Type
boolean

__ca_pull__(request, cb)

Source:

Polls for pending notification messages.

Parameters:
Name Type Description
request Object

A notification request message.

cb cbType

A callback called when there is a new notification message (or timeout).

__ca_pulse__(cb)

Source:
See:
  • cron_pulser

Queues a pulse message for this CA, enabling autonomous computation.

Parameters:
Name Type Description
cb cbType

A callback function to continue after the pulse message.

__ca_setJustCreated__(value) → {boolean}

Source:

Sets the value of a flag that indicates this CA was recently created.

Parameters:
Name Type Description
value boolean

A new value.

Returns:

The old value.

Type
boolean