Exemplo n.º 1
0
  private void removeRemoteIndexingInterceptorFromConfig(Configuration cfg) {
    ConfigurationBuilder builder = new ConfigurationBuilder();
    CustomInterceptorsConfigurationBuilder customInterceptorsBuilder = builder.customInterceptors();

    for (InterceptorConfiguration interceptorConfig : cfg.customInterceptors().interceptors()) {
      if (!(interceptorConfig.asyncInterceptor() instanceof RemoteValueWrapperInterceptor)) {
        customInterceptorsBuilder.addInterceptor().read(interceptorConfig);
      }
    }

    cfg.customInterceptors().interceptors(builder.build().customInterceptors().interceptors());
  }
Exemplo n.º 2
0
  private void removeQueryInterceptorFromConfiguration(Configuration cfg) {

    ConfigurationBuilder builder = new ConfigurationBuilder();
    CustomInterceptorsConfigurationBuilder customInterceptorsBuilder = builder.customInterceptors();

    for (InterceptorConfiguration interceptorConfig : cfg.customInterceptors().interceptors()) {
      if (!(interceptorConfig.interceptor() instanceof QueryInterceptor)) {
        customInterceptorsBuilder.addInterceptor().read(interceptorConfig);
      }
    }

    cfg.customInterceptors().interceptors(builder.build().customInterceptors().interceptors());
  }