Module: caf_ca/gen_ca

Generic Cloud Assistant.

Source:

Extends

Members

__ca_isCA__ :boolean

Run-time type information.

Type:
  • boolean
Source:

Methods

__ca_destroy__(dataopt, cb)

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.

Source:

__ca_getAppName__() → {string}

Returns the application name.

Source:
Returns:

The application name.

Type
string

__ca_getName__() → {string}

Returns the name of this CA.

Source:
Returns:

The name of this CA.

Type
string

__ca_isJustCreated__() → {boolean}

Whether this CA was recently created.

Source:
Returns:

True if this CA was recently created.

Type
boolean

__ca_process__(msg, cb)

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.

Source:

__ca_progress__() → {boolean}

Checks for progress processing messages.

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

Source:
See:
  • cron_ripper
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)

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).

Source:

__ca_pulse__(cb)

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.

Source:
See:
  • cron_pulser

__ca_setJustCreated__(value) → {boolean}

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

Parameters:
Name Type Description
value boolean

A new value.

Source:
Returns:

The old value.

Type
boolean