What is synchronous replication?
Let assume that we want define a new cache with synchronous replication programmatically. We create a fresh instance of Configuration object and we set cache mode to synchronous replication. Finally, we define/register this configuration with a manager. If specified cache name "repl" hasn't been defined before, default cache's configuration is cloned and overriden with a clone of our newly created configuration. Â Configuration c = new Configuration(); c.setCacheMode(CacheMode.REPL_SYNC); Â Â Â Â Â String newCacheName = "repl"; manager.defineConfiguration(newCacheName, c); Cache cache = manager.getCache(newCacheName);