Class

ResultHandle

ResultHandle()

This class represents a handle on a job's results. It can be used for accessing the job's results, or for querying the scheduler to fetch results. In addition to the properties and methods of this class, the following standard array methods are also available for accessing the available results: slice, filter, concat, find, findIndex, indexOf, map, reduce, includes, toString, and forEach. The results can also be accessed by index (results[i]), but an error will be thrown if the result for that index is not yet available.

Constructor

# new ResultHandle()

Members

number

# length

The length of the available results array.

Methods

# entries() → {Array.<*>}

Returns an array of [input, output] pairs, in sliceNumber order. Return value is undefined if the input is not an ES5 primitive.

Array.<*>

# async fetch(rangeObjectopt, emitEventsopt)

Sends request to scheduler to fetch results, the retrieved results will be populated on this object.

Parameters:
Name Type Attributes Description
rangeObject RangeObject <optional>

not implemented, leave as undefined - range object to query results

emitEvents string <optional>

set to 'all' to get a result event for each result as they are added to the handle.

# fromEntries() → {object}

Returns an Object associating input and output values where the inputs are ES5 primitive types. Return value is undefined if the input is not an ES5 primitive.

object

# key(n) → {*}

Return the nth input value/input vector

Parameters:
Name Type Description
n number

Index in the input set to return the value for.

Input set value

*

# keys() → {Array.<*>}

Returns an array of input values. Will only return input values that have a completed result available.

Array.<*>

# lookupValue(key) → {*}

Return the value corresponding to the provided key

Parameters:
Name Type Description
key *

Corresponds to a value in the job's input set.

Result corresponding to the input value

*

# values() → {Array.<*>}

Returns an array of results. Will only return results that have been received from the scheduler, if only one result is complete the array will contain one value.

Array.<*>