Contact Free trial Login

Object Store Connector Reference

Object Store Connector v1.1.3

Support Category: Select

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 to provide to this configuration.

x

Connection Types

Connection

A ConnectionProvider that returns the Mule 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 fails 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

A reference to the Object Store to use. If not defined, the runtime's default partition is used.

Throws

  • OS:STORE_NOT_AVAILABLE

Contains

<os:contains>

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

This operation is synchronized at the key level. No other operation can access the same key on the same object store while this operation is running. If the runtime is running in 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

A reference to the Object Store to use. If not defined, the runtime's default partition is used.

Target Variable

String

The name of a variable to store the operation's output.

Target Value

String

An expression to evaluate against the operation's output and store the expression outcome in the target variable.

#[payload]

Output

Type

Boolean

Throws

  • OS:INVALID_KEY

  • OS:STORE_NOT_AVAILABLE

Remove

<os:remove>

Removes the value associated to the given key. If no value exists for the key, then an OS:KEY_NOT_FOUND error is thrown.

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 in 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

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

Throws

  • OS:INVALID_KEY

  • OS:STORE_NOT_AVAILABLE

  • OS:KEY_NOT_FOUND

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 was not provided or was resolved to a null value, then an OS:KEY_NOT_FOUND error is thrown. Otherwise, the defaultValue is returned, but that value is not stored.

Finally, this operation is synchronized on the key level. No other operation can access the same key on the same object store while this operation is running. If the runtime is running in 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

A reference to the Object Store to use. If not defined, the runtime's default partition is used.

Target Variable

String

The name of a variable to store the operation's output.

Target Value

String

An expression to evaluate against the operation's output and store the expression outcome in the target variable.

#[payload]

Output

Type

Any

Throws

  • OS:INVALID_KEY

  • OS:KEY_NOT_FOUND

  • OS:STORE_NOT_AVAILABLE

Retrieve All

<os:retrieve-all>

Retrieves all the key value pairs in the object store.

Parameters

Name Type Description Default Value Required

Object Store

A reference to the Object Store to use. If not defined, the runtime's default partition is used.

Target Variable

String

The name of a variable to store the operation's output.

Target Value

String

An expression to evaluate against the operation's output and store the expression outcome in the target variable.

#[payload]

Output

Type

Object

Throws

  • OS:STORE_NOT_AVAILABLE

Retrieve All Keys

<os:retrieve-all-keys>

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

Parameters

Name Type Description Default Value Required

Object Store

A reference to the Object Store to use. If not defined, the runtime's default partition is used.

Target Variable

String

The name of a variable to store the operation's output.

Target Value

String

An expression to evaluate against the operation's output and store the expression outcome in the target variable.

#[payload]

Output

Type

Array of String

Throws

  • 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 with that key is overwritten. If the parameter is set to true, then an OS:KEY_ALREADY_EXISTS error is 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. Setting it to false makes the connector skip null values, which prevents the need to use a <choice/> router to check the condition, while using the default value of true makes the connector throw a NULL_VALUE error.

Finally, this operation is synchronized on the key level. No other operation can access the same key on the same object store while this operation is running. If the runtime is running in 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

A reference to the Object Store to use. If not defined, the runtime's default partition is used.

Throws

  • OS:INVALID_KEY

  • OS:KEY_ALREADY_EXISTS

  • OS:NULL_VALUE

  • OS:STORE_NOT_AVAILABLE

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 fails 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 milliseconds to reconnect.

Count

Number

How many reconnection attempts to make.

blocking

Boolean

If false, the reconnection strategy runs in a separate, non-blocking thread.

true

Reconnect Forever

Field Type Description Default Value Required

Frequency

Number

How often in milliseconds to reconnect.

blocking

Boolean

If false, the reconnection strategy runs in a separate, non-blocking thread.

true

Object Store

These settings do not apply to Object Store v2.
Field Type Description Default Value Required

Persistent

Boolean

Whether the store is persistent or transient.

true

Max Entries

Number

The max number of entries allowed. Exceeding entries are removed when the expiration thread runs. If absent, then the described Object Store has no size boundaries.

Entry Ttl

Number

The entry timeout. If absent, then the described Object Store has no time boundaries.

Entry Ttl Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

An entry’s time to live (#entryTtl).

SECONDS

Expiration Interval

Number

How frequently the expiration thread should run. The default value is 1 minute.

The Expiration Interval field requires that the Max Entries or Entry Ttl fields also be set. If neither is set, then putting a value in Expiration Interval has no effect and the expiration thread does not run. If Expiration Interval is set to a value lower than or equal to zero, then the object store never expires.

1

Expiration Interval Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

The expiration interval (#expirationInterval).

MINUTES

Config Ref

A reference to an os:config element used to declare this Object Store.

If not provided, the Mule runtime’s default ObjectStoreManager is used. Setting this parameter is only necessary when you want to use a non-default Object Store implementation. For example, if you want to have a store which is backed by Redis or JDBC.

Object Store Connector

Field Type Description Default Value Required

Config Name

String

Private Object Store

These settings do not apply to Object Store v2.
Field Type Description Default Value Required

Alias

String

A friendly name to refer to this store in the management user interface. Provide this alias if you would like it to be easier to identify this store. If not provided, Mule auto generates an ID.

Persistent

Boolean

Whether the store is persistent or transient.

true

Max Entries

Number

The maximum number of entries allowed. Exceeding entries are removed when the expiration thread runs. If absent, then the described Object Store has no size boundaries.

Entry Ttl

Number

The entry timeout. If absent, then the described Object Store has no time boundaries.

Entry Ttl Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

An entry’s time to live (#entryTtl).

SECONDS

Expiration Interval

Number

How frequently the expiration thread should run. The default value is 1 minute.

The Expiration Interval field requires that the Max Entries or Entry Ttl fields also be set. If neither is set, then putting a value in Expiration Interval has no effect and the expiration thread does not run. If Expiration Interval is set to a value lower than or equal to zero, then the object store never expires.

1

Expiration Interval Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

The expiration interval (#expirationInterval).

MINUTES

Config Ref

A reference to an os:config element which is used to declare this Object Store. If not provided, the Mule runtime’s default ObjectStoreManager is used. Setting this parameter is only necessary when you want to use a non-default Object Store implementation. For example, if you want to have a store which is backed by Redis or JDBC.

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.