Runtime components : Service components : Remote cache service : How to use the remote cache
  
How to use the remote cache
You configure the remote cache service in the UDTT configuration file: btt.xml
<kColl id="RemoteCacheService">
    <field id="initializer" value="com.unicomsi.udtt.rcache.RemoteCacheInitializer" />
    <field id="implClass" value="com.unicomsi.udtt.rcache.redis.RedisCache" />
    <kColl id="parameters">
        <kColl id="JedisPoolConfig">
            <!-- Apache Commons Pool 2 -->
        </kColl>
        <kColl id="JedisConfig">
            <field id="host" value="localhost" />
        </kColl>
    </kColl>
</kColl>
To make the service extensible and replaceable, the programming interface is defined in the abstract class com.unicomsi.udtt.rcache.RCache.
The class com.unicomsi.udtt.rcache.redis.RedisCache is the default implementation and can be used as is, or you can extend or replace the class as required.
The parameters depend on your implementation. For Jedis, refer to the Javadoc for the following:
com.unicomsi.udtt.rcache.redis.JedisConfigHelper
com.unicomsi.udtt.rcache.redis.JedisPoolConfigFactory
See:
Access data without using locks
Access data by using locks
Access data by using RCacheOperation
See also:
Go up to
Remote cache service