Object Store Extension
Configurations
Config
Generic module for accessing Object Stores.
This can be used with Mule default implementations or one can be passed via ref. It allows to store, retrieve and remove objects from the store.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Name |
String |
The name of this configuration. With this name can be later referenced. |
x |
|
Partition |
String |
|
||
Persistent |
Boolean |
false |
|
|
Object Store |
|
|||
Entry Ttl |
Number |
|
||
Max Entries |
Number |
|
||
Expiration Interval |
Number |
|
Associated Operations
Operations
Contains
<objectstoren:contains>
Checks whether the object store contains the given key. The identifier of the object to validate. if the provided key is null.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Key |
String |
x |
||
Target Variable |
String |
The name of a variable on which the operation's output will be placed |
|
Output
Type |
Boolean |
For Configurations.
Throws
-
OBJECTSTOREN:DOES_NOT_EXIST
-
OBJECTSTOREN:UNKNOWN
-
OBJECTSTOREN:CONNECTIVITY
-
OBJECTSTOREN:ALREADY_EXISTS
-
OBJECTSTOREN:NOT_AVAILABLE
Dispose Store
<objectstoren:dispose-store>
Removes a given partition without disposing the entirely Object Store. Whether using a persistent store or not, internally, this operation performs a clear() of the items, so a user should still be able perform other operations. For persistent stores, this operation only deletes the contents of the folder but not the folder itself. The name of the object store. If the object store could not be cleared or the partition name is invalid.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Partition Name |
String |
x |
For Configurations.
Throws
-
OBJECTSTOREN:DOES_NOT_EXIST
-
OBJECTSTOREN:UNKNOWN
-
OBJECTSTOREN:CONNECTIVITY
-
OBJECTSTOREN:ALREADY_EXISTS
-
OBJECTSTOREN:NOT_AVAILABLE
Dual Store
<objectstoren:dual-store>
Stores a value using key and also stores a key using value. If an exception is thrown rolls back both operations. This allows an option to indicate if key would be
overwritten or not.
True if you want to overwrite the existing object.
The identifier of the object to store.
The object to store. If you want this to be the payload then use value-ref="#[payload]".
if the given key cannot be stored or is null
.
if the store is not available or any other implementation-specific error occurred.
if an attempt is made to store an object for a key that already has an object associated. Only thrown if overwrite is false.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Key |
String |
x |
||
Value |
Any |
x |
||
Overwrite |
Boolean |
false |
|
For Configurations.
Throws
-
OBJECTSTOREN:DOES_NOT_EXIST
-
OBJECTSTOREN:UNKNOWN
-
OBJECTSTOREN:CONNECTIVITY
-
OBJECTSTOREN:ALREADY_EXISTS
-
OBJECTSTOREN:NOT_AVAILABLE
Remove
<objectstoren:remove>
Remove the object for the respective key. This operation can fail silently based on the value passed in ignoreNotExists.
Indicates if the operation will ignore NotExistsException from ObjectStore.
The identifier of the object to remove.
if the given key is null
or if the store is not available or any other implementation-specific error occurred.
if no value for the given key was previously stored.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Key |
String |
x |
||
Ignore if key does not exist |
Boolean |
false |
|
|
Target Variable |
String |
The name of a variable on which the operation's output will be placed |
|
Output
Type |
Any |
For Configurations.
Throws
-
OBJECTSTOREN:DOES_NOT_EXIST
-
OBJECTSTOREN:UNKNOWN
-
OBJECTSTOREN:CONNECTIVITY
-
OBJECTSTOREN:ALREADY_EXISTS
-
OBJECTSTOREN:NOT_AVAILABLE
Retrieve
<objectstoren:retrieve>
Retrieve an object from the object store and make it available in the specified property scope of a Mule Message.
The identifier of the object to retrieve.
The default value if the key does not exist.
if the given key is null
.
if the store is not available or any other implementation-specific error occurred.
if no value for the given key was previously stored.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Key |
String |
x |
||
Default Value |
Any |
|
||
Target Variable |
String |
The name of a variable on which the operation's output will be placed |
|
Output
Type |
Any |
For Configurations.
Throws
-
OBJECTSTOREN:DOES_NOT_EXIST
-
OBJECTSTOREN:UNKNOWN
-
OBJECTSTOREN:CONNECTIVITY
-
OBJECTSTOREN:ALREADY_EXISTS
-
OBJECTSTOREN:NOT_AVAILABLE
Retrieve All Keys
<objectstoren:retrieve-all-keys>
Returns a list of all the keys in the object store.
IMPORTANT: Not all stores support this method. If the method is not supported a java.lang.UnsupportedOperationException is thrown if an exception occurred while collecting the list of all keys.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Target Variable |
String |
The name of a variable on which the operation's output will be placed |
|
Output
Type |
Array of String |
For Configurations.
Throws
-
OBJECTSTOREN:DOES_NOT_EXIST
-
OBJECTSTOREN:UNKNOWN
-
OBJECTSTOREN:CONNECTIVITY
-
OBJECTSTOREN:ALREADY_EXISTS
-
OBJECTSTOREN:NOT_AVAILABLE
Retrieve And Store
<objectstoren:retrieve-and-store>
Retrieve and Store in the same operation.
The identifier of the object to retrieve.
The default value if the key does not exist.
The object to store. If you want this to be the payload then use value-ref="#[payload]".
if the given key is null
.
if the store is not available or any other implementation-specific error occurred.
if no value for the given key was previously stored.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Key |
String |
x |
||
Default Value |
Any |
|
||
Store Value |
Any |
x |
||
Target Variable |
String |
The name of a variable on which the operation's output will be placed |
|
Output
Type |
Any |
For Configurations.
Throws
-
OBJECTSTOREN:DOES_NOT_EXIST
-
OBJECTSTOREN:UNKNOWN
-
OBJECTSTOREN:CONNECTIVITY
-
OBJECTSTOREN:ALREADY_EXISTS
-
OBJECTSTOREN:NOT_AVAILABLE
Store
<objectstoren:store>
Stores an object in the object store. This allows an option to indicate if key would be overwritten or not.
True if you want to overwrite the existing object.
The identifier of the object to store.
The object to store. If you want this to be the payload then use value-ref="#[payload]".
if the given key cannot be stored or is null
.
if the store is not available or any other implementation-specific error occurred.
if an attempt is made to store an object for a key that already has an object associated. Only thrown if overwrite is false.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration |
String |
The name of the configuration to use. |
x |
|
Key |
String |
x |
||
Value |
Any |
x |
||
Overwrite |
Boolean |
false |
|
For Configurations.
Throws
-
OBJECTSTOREN:DOES_NOT_EXIST
-
OBJECTSTOREN:UNKNOWN
-
OBJECTSTOREN:CONNECTIVITY
-
OBJECTSTOREN:ALREADY_EXISTS
-
OBJECTSTOREN:NOT_AVAILABLE