import org.infinispan.client.hotrod.RemoteCache; import org.infinispan.client.hotrod.RemoteCacheManager; import org.infinispan.client.hotrod.configuration.ConfigurationBuilder; public class Client { public static void main(String[] args) { ClassLoader tccl = Thread.currentThread().getContextClassLoader(); ConfigurationBuilder builder = new ConfigurationBuilder(); builder .addServer() .host("127.0.0.1") .port(11222) .ssl() .enable() .keyStoreFileName(tccl.getResource("keystore.jks").getPath()) .keyStorePassword("secret".toCharArray()) .trustStoreFileName(tccl.getResource("keystore.jks").getPath()) .trustStorePassword("secret".toCharArray()); RemoteCacheManager rcm = new RemoteCacheManager(builder.build()); RemoteCache<String, String> cache = rcm.getCache("default"); cache.put("c", "c"); System.out.printf("c=%s\n", cache.get("c")); rcm.stop(); } }