-
Type: Improvement
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 7.4
-
Component/s: TransientStore
-
Tags:
-
Impact type:API change, Configuration Change
-
Upgrade notes:
-
Sprint:TGV 07
The TransientStore API, the TransientStoreService and the related interfaces have been improved mainly to:
Be more consistent
The StorageEntry interface now:
- Handles putting and getting a map of parameters
void putAll(Map<String, Serializable> params) Map<String, Serializable> getParameters()
- Only provides one method to add blobs
void setBlobs(List<Blob> blobs)
Define a default transient store configuration
The templates/common/config/transient-store-config.xml.nxftl contribution defines the "default" transient store:
<#if "${nuxeo.redis.enabled}" == "true"> <#assign className = "org.nuxeo.ecm.core.redis.contribs.RedisTransientStore" /> <#else> <#assign className = "org.nuxeo.ecm.core.transientstore.SimpleTransientStore" /> </#if> <extension target="org.nuxeo.ecm.core.transientstore.TransientStorageComponent" point="store"> <store name="default" class="${className}"> <targetMaxSizeMB>-1</targetMaxSizeMB> <absoluteMaxSizeMB>-1</absoluteMaxSizeMB> <fistLevelTTL>120</fistLevelTTL> <secondLevelTTL>10</secondLevelTTL> <minimalRetention>10</minimalRetention> </store> </extension>
We can see that its implementation depends on the nuxeo.redis.enabled property, using the RedisTransientStore implementation if Redis is enabled and the SimpleTransientStore otherwise.
When getting a store with TransientStoreService#getStore(String name) if the store doesn't exist a fallback is done on the "default" one.