@@ -0,0 +1,848 @@
+package com.kylin.infinispan.stu.configuring;%0A%0Aimport java.io.IOException;%0A%0Aimport org.infinispan.Cache;%0Aimport org.infinispan.configuration.cache.CacheMode;%0Aimport org.infinispan.configuration.cache.Configuration;%0Aimport org.infinispan.configuration.cache.ConfigurationBuilder;%0Aimport org.infinispan.manager.DefaultCacheManager;%0Aimport org.infinispan.manager.EmbeddedCacheManager;%0A%0Apublic class ProgrammaticConfiguration %7B%0A%0A%09public static void main(String%5B%5D args) throws IOException %7B%0A%0A%09%09EmbeddedCacheManager manager = new DefaultCacheManager();%0A//%09%09Cache defaultCache = manager.getCache();%0A%09%09%0A%09%09Configuration c = new ConfigurationBuilder().clustering().cacheMode(CacheMode.REPL_SYNC).build();%0A%09%09%0A%09%09String newCacheName = %22repl%22;%0A%09%09manager.defineConfiguration(newCacheName, c);%0A%09%09Cache%3CString, String%3E cache = manager.getCache(newCacheName);%0A%09%7D%0A%0A%7D%0A

add configuring cache api test code