Caching In OpenMigrate - tsgrp/OpenMigrate GitHub Wiki
As of revision #14935, caching features from OpenContent have been brought over to OpenMigrate.
Currently, the only implemented cache type is BasicStringToStringCache
(which is just a ConcurrentHashMap<String, String>
under the hood), any other cache types will have to be implemented as needed. Caches can be instantiated as singletons so that you can share cache values across multiple steps in the migration.
An example where shared string to string caching would be useful is an Alfresco migration that uses the LinkAlfrescoNodeToParent
listener. Both MigrationTargetAlfrescoCMIS
and LinkAlfrescoNodeToParent
have their own automatically instantiated caches already - but since both use folder paths during their operation, they can share a cache that maps folder paths to noderefs. Setting it up would look something like this:
<bean id="folderCache" class="com.tsgrp.migration.cache.BasicStringToStringCache" scope="singleton" init-method="init">
<property name="generateCacheOnStartup" value="true"/>
</bean>
<property name="foldersCache" ref="folderCache"/>
<property name="folderCache" ref="folderCache"/>