Object Store Connector Reference - Mule 4
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.
Operations
Clear
<os:clear>
Removes all the contents in the store.
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 checked. |
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. |
|
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.
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. |
|
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. |
|
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. |
|
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 |
|
|
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. |
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:
|
An entry’s time to live ( |
SECONDS |
|
Expiration interval |
Number |
How frequently the expiration thread should run. The default value is 1 minute. The |
1 |
|
Expiration interval unit |
Enumeration, one of:
|
The expiration interval ( |
MINUTES |
|
Configuration Reference |
A reference to an If not provided, the Mule runtime’s default ObjectStoreManager is used. Setting this parameter is necessary only when you want to use a nondefault object store implementation: for example, if you want to have a store that is backed by Redis or JDBC. |
Object Store (Object Store v2)
These settings apply only to Object Store v2. |
Field | Type | Description | Default Value | Required |
---|---|---|---|---|
Persistent |
Boolean |
Whether the store is persistent or transient. |
true |
|
Max entries |
Not configurable for Object Store v2. The maximum number of entries is unlimited. |
|||
Entry ttl |
Number |
The entry timeout. Ignored if the value of
If the field contains:
For information about the rolling and static TTL behavior, see How long can data persist in Object Store v2?. |
2592000 seconds (30 days) |
|
Entry ttl unit |
Enumeration, one of:
|
The unit for the entry’s time to live ( |
SECONDS |
|
Expiration interval |
Positive number |
How frequently the expiration thread should run. Set If The |
1 minute |
|
Expiration interval unit |
Enumeration, one of:
|
The expiration interval ( |
MINUTES |
|
Configuration Reference |
A reference to an If not provided, the Mule runtime’s default ObjectStoreManager is used. Setting this parameter is necessary only when you want to use a nondefault object store implementation: for example, if you want to have a store that is backed by Redis or JDBC. |
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:
|
An entry’s time to live ( |
SECONDS |
|
Expiration interval |
Number |
How frequently the expiration thread should run. The default value is 1 minute. The |
1 |
|
Expiration interval unit |
Enumeration, one of:
|
The expiration interval ( |
MINUTES |
|
Configuration Reference |
A reference to an If not provided, the Mule runtime’s default ObjectStoreManager is used. Setting this parameter is necessary only when you want to use a nondefault object store implementation: for example, if you want to have a store that is backed by Redis or JDBC. |