Nav

Object Store Connector Reference

Connector that provides functionality to access and create Object Store instances.

Configurations


Config

Default configuration

Parameters

Name Type Description Default Value Required

Name

String

The name for this configuration. Connectors reference the configuration with this name.

x 

Connection

The connection types that can be provided to this configuration.

x 

Connection Types

Connection

A ConnectionProvider which returns the runtime's default ObjectStoreManager

Parameters
Name Type Description Default Value Required

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment will fail if the test doesn't pass after exhausting the associated reconnection strategy

 

Operations

Clear

<os:clear>

Removes all the contents in the store.

Parameters

Name Type Description Default Value Required

Object Store

String

A reference to the ObjectStore to be used. If not defined, the runtime's default partition will be used

 

Throws

  • OS:STORE_NOT_FOUND  

  • OS:STORE_NOT_AVAILABLE  

Contains

<os:contains>

Checks if there is any value associated to the given key. If no value exist for the key, then false will be returned.

This operation is synchronized on the key level. No other operation will be able to access the same key on the same object store while this operation is running. If the runtime is running on cluster mode, this synchronization is also guaranteed across nodes.

Parameters

Name Type Description Default Value Required

Key

String

the key of the object to be removed

x 

Object Store

String

A reference to the ObjectStore to be used. If not defined, the runtime's default partition will be used

 

Target Variable

String

The name of a variable on which the operation's output will be placed

 

Target Value

String

An expression that will be evaluated against the operation's output and the outcome of that expression will be stored in the target variable

#[payload]

 

Output

Type

Boolean

Throws

  • OS:STORE_NOT_FOUND  

  • OS:STORE_NOT_AVAILABLE  

  • OS:INVALID_KEY  

Remove

<os:remove>

Removes the value associated to the given key. If no value exist for the key, then a OS:KEY_NOT_FOUND error will be thrown.

This operation is synchronized on the key level. No other operation will be able to access the same key on the same object store while this operation is running. If the runtime is running on cluster mode, this synchronization is also guaranteed across nodes.

Parameters

Name Type Description Default Value Required

Key

String

the key of the object to be removed

x 

Object Store

String

A reference to the ObjectStore to be used. If not defined, the runtime's default partition will be used

 

Throws

  • OS:STORE_NOT_FOUND  

  • OS:STORE_NOT_AVAILABLE  

  • OS:KEY_NOT_FOUND  

  • OS:INVALID_KEY  

Retrieve

<os:retrieve>

Retrieves the value stored for the given key.

If no value exists for the key, behavior depends on the defaultValue parameter:

  • If the parameter isn’t provided or it resolves to a null value, then an OS:KEY_NOT_FOUND error is thrown.

  • If the parameter is provided and doesn’t resolve to a null value, the defaultValue is returned, but not stored.

This operation is synchronized on the key level. No other operation is able to access the same key on the same object store while this operation is running. If the runtime is running on cluster mode, this synchronization is also guaranteed across nodes.

Parameters

Name Type Description Default Value Required

Key

String

the key of the value to be retrieved

x 

Default Value

Any

value to be returned if the key doesn't exist in the store

 

Object Store

String

A reference to the ObjectStore to be used. If not defined, the runtime's default partition will be used

 

Target Variable

String

The name of a variable on which the operation's output will be placed

 

Target Value

String

An expression that will be evaluated against the operation's output and the outcome of that expression will be stored in the target variable

#[payload]

 

Output

Type

Any

Throws

  • OS:STORE_NOT_FOUND  

  • OS:STORE_NOT_AVAILABLE  

  • OS:KEY_NOT_FOUND  

  • OS:INVALID_KEY  

Retrieve All

<os:retrieve-all>

Retrieves all the key value pairs in the object store

Parameters

Name Type Description Default Value Required

Object Store

String

A reference to the ObjectStore to be used. If not defined, the runtime's default partition will be used

 

Target Variable

String

The name of a variable on which the operation's output will be placed

 

Target Value

String

An expression that will be evaluated against the operation's output and the outcome of that expression will be stored in the target variable

#[payload]

 

Output

Type

Object

Throws

  • OS:STORE_NOT_FOUND  

  • OS:STORE_NOT_AVAILABLE  

Retrieve All Keys

<os:retrieve-all-keys>

Returns a List containing all keys that the objectStore currently holds values for.

Parameters

Name Type Description Default Value Required

Object Store

String

A reference to the ObjectStore to be used. If not defined, the runtime's default partition will be used

 

Target Variable

String

The name of a variable on which the operation's output will be placed

 

Target Value

String

An expression that will be evaluated against the operation's output and the outcome of that expression will be stored in the target variable

#[payload]

 

Output

Type

Array of String

Throws

  • OS:STORE_NOT_FOUND  

  • OS:STORE_NOT_AVAILABLE  

Store

<os:store>

Stores the given value using the given key.

This operation can be used either for storing new values or updating existing ones, depending on the value of the failIfPresent. When that parameter is set to false (default value) then any pre existing value associated to that key will be overwritten. If the parameter is set to true, then a OS:KEY_ALREADY_EXISTS error will be thrown instead.

Another important consideration is regarding null values. It is not allowed to store a null value. However, a common use case is to obtain a value (most likely by evaluating a expression or transformation), testing the value for not null, storing it if present and doing nothing otherwise. The failOnNullValue parameter simplifies this use case. On its default value of true, a OS:NULL_VALUE error is thrown if a null value is supplied. However, when set to false, a null value will cause this operation to do nothing, no error will be raised but no value will be altered either.

Finally, this operation is synchronized on the key level. No other operation will be able to access the same key on the same object store while this operation is running. If the runtime is running on cluster mode, this synchronization is also guaranteed across nodes.

Parameters

Name Type Description Default Value Required

Key

String

the key of the value to be stored

x 

Value

Any

the value to be stored. Should not be null if failOnNullValue is set to true

#[payload]

 

Fail If Present

Boolean

Whether to fail or update the pre existing value if the key already exists on the store

false

 

Fail On Null Value

Boolean

Whether to fail or skip the operation if the value is null

true

 

Object Store

String

A reference to the ObjectStore to be used. If not defined, the runtime's default partition will be used

 

Throws

  • OS:STORE_NOT_FOUND  

  • OS:NULL_VALUE  

  • OS:STORE_NOT_AVAILABLE  

  • OS:KEY_ALREADY_EXISTS  

  • OS:INVALID_KEY  

Types

Reconnection

Field Type Description Default Value Required

Fails Deployment

Boolean

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment will fail if the test doesn’t pass after exhausting the associated reconnection strategy

Reconnection Strategy

The reconnection strategy to use

Reconnect

Field Type Description Default Value Required

Frequency

Number

How often (in ms) to reconnect

Count

Number

How many reconnection attempts to make

Reconnect Forever

Field Type Description Default Value Required

Frequency

Number

How often (in ms) to reconnect