removeRemoteIndexingInterceptorFromConfig(cfg);
}
private void removeRemoteIndexingInterceptorFromConfig(Configuration cfg) {
ConfigurationBuilder builder = new ConfigurationBuilder();
CustomInterceptorsConfigurationBuilder customInterceptorsBuilder = builder.customInterceptors();
for (InterceptorConfiguration interceptorConfig : cfg.customInterceptors().interceptors()) {
if (!(interceptorConfig.interceptor() instanceof RemoteValueWrapperInterceptor)) {
customInterceptorsBuilder.addInterceptor().read(interceptorConfig);
}
}
cfg.customInterceptors().interceptors(builder.build().customInterceptors().interceptors());
}