private Configuration getMetadataCacheConfig() {
ConfigurationBuilder configurationBuilder = new ConfigurationBuilder();
//allow the registry to work for local caches as well as isClustered caches
boolean isClustered = cacheManager.getGlobalComponentRegistry().getGlobalConfiguration().isClustered();
configurationBuilder.clustering().cacheMode(isClustered ? CacheMode.REPL_SYNC : CacheMode.LOCAL);
//use a transactional cache for high consistency as writes are expected to be rare in this cache
configurationBuilder.transaction().transactionMode(TransactionMode.TRANSACTIONAL);
//fetch the state (redundant as state transfer this is enabled by default, keep it here to document the intention)