fileStore.jmxStatistics().disable(); final Configuration config = persistConfig.addStore(fileStore).build(); config.compatibility().enabled(); manager.getManager().defineConfiguration(namedCache, config);
/** * Registers the remote value wrapper interceptor in the cache before it gets started. */ @Override public void cacheStarting(ComponentRegistry cr, Configuration cfg, String cacheName) { if (!cacheName.equals(Support.AVRO_METADATA_CACHE_NAME)) { if (cfg.indexing().index().isEnabled() && !cfg.compatibility().enabled()) { log.infof("Registering RemoteAvroValueWrapperInterceptor for cache %s", cacheName); createRemoteIndexingInterceptor(cr, cfg); } } }
@Override public void cacheStarted(ComponentRegistry cr, String cacheName) { Configuration configuration = cr.getComponent(Configuration.class); boolean remoteValueWrappingEnabled = configuration.indexing().index().isEnabled() && !configuration.compatibility().enabled(); if (!remoteValueWrappingEnabled) { if (verifyChainContainsRemoteAvroValueWrapperInterceptor(cr)) { throw new IllegalStateException("It was NOT expected to find the RemoteAvroValueWrapperInterceptor registered in the InterceptorChain as indexing was disabled, but it was found"); } return; } if (!verifyChainContainsRemoteAvroValueWrapperInterceptor(cr)) { throw new IllegalStateException("It was expected to find the RemoteAvroValueWrapperInterceptor registered in the InterceptorChain but it wasn't found"); } }
@Override public void call() { Configuration cfg = cm.getDefaultCacheConfiguration(); assertTrue(cfg.compatibility().enabled()); assertNull(cfg.compatibility().marshaller()); } });
@Override public void call() { Configuration cfg = cm.getDefaultCacheConfiguration(); assertTrue(cfg.compatibility().enabled()); assertTrue(cfg.compatibility().marshaller() instanceof GenericJBossMarshaller); } });
@Override public void call() { Configuration cfg = cm.getDefaultCacheConfiguration(); assertFalse(cfg.compatibility().enabled()); assertNull(cfg.compatibility().marshaller()); } });
compareAttributeSets(name, configurationBefore.compatibility().attributes(), configurationAfter.compatibility().attributes(), "marshaller"); compareAttributeSets(name, configurationBefore.memory().attributes(), configurationAfter.memory().attributes()); compareAttributeSets(name, configurationBefore.expiration().attributes(), configurationAfter.expiration().attributes());
assertTrue(c.compatibility().enabled()); assertTrue(c.compatibility().marshaller() instanceof GenericJBossMarshaller); assertFalse(c.deadlockDetection().enabled()); assertEquals(-1, c.deadlockDetection().spinDuration());