new eFTLKVMap()
A key-value map object allows setting, getting, and removing key-value pairs in an FTL map.
Methods
-
get(key, options)
-
Get a key-value pair from the map.
Parameters:
Name Type Description keykey Get the value for this key. optionsobject A JavaScript object holding key-value map callbacks. Properties
Name Type Argument Description onSuccesseFTLKVMap~onSuccess <optional>
Process success. onErroreFTLKVMap~onError <optional>
Process errors. -
remove(key, options)
-
Remove a key-value pair from the map.
Parameters:
Name Type Description keykey Remove the value for this key. optionsobject A JavaScript object holding key-value map callbacks. Properties
Name Type Argument Description onSuccesseFTLKVMap~onSuccess <optional>
Process success. onErroreFTLKVMap~onError <optional>
Process errors. -
set(key, message, options)
-
Set a key-value pair in the map, overwriting any existing value.
Parameters:
Name Type Description keykey Set the value for this key. messageeFTLMessage Set this value for the key. optionsobject A JavaScript object holding key-value map callbacks. Properties
Name Type Argument Description onSuccesseFTLKVMap~onSuccess <optional>
Process success. onErroreFTLKVMap~onError <optional>
Process errors.
Type Definitions
-
onError(key, message, errorCode, reason)
-
An error prevented a key-value map operation.
Parameters:
Name Type Description keystring The key being operated upon. messageeFTLMessage The value of the key. errorCodeobject A code categorizes the error. Your program can use this value in its response logic. reasonstring This string provides more detail. Your program can use this value in error reporting and logging. -
onSuccess(key, message)
-
A key-value map operation has completed successfully.
Parameters:
Name Type Description keystring The key being operated upon. messageeFTLMessage The value of the key.