Merge pull request elastic/elasticsearch#1041 from jpountz/fix/remove_onIndexService
Stop using onIndexService. Original commit: elastic/x-pack-elasticsearch@d048f0ee78
This commit is contained in:
commit
8645bd4ecd
|
@ -18,6 +18,7 @@ import org.elasticsearch.env.Environment;
|
||||||
import org.elasticsearch.http.HttpServerModule;
|
import org.elasticsearch.http.HttpServerModule;
|
||||||
import org.elasticsearch.index.IndexModule;
|
import org.elasticsearch.index.IndexModule;
|
||||||
import org.elasticsearch.index.IndexService;
|
import org.elasticsearch.index.IndexService;
|
||||||
|
import org.elasticsearch.index.shard.IndexEventListener;
|
||||||
import org.elasticsearch.plugins.Plugin;
|
import org.elasticsearch.plugins.Plugin;
|
||||||
import org.elasticsearch.rest.RestModule;
|
import org.elasticsearch.rest.RestModule;
|
||||||
import org.elasticsearch.shield.action.ShieldActionFilter;
|
import org.elasticsearch.shield.action.ShieldActionFilter;
|
||||||
|
@ -51,7 +52,6 @@ import org.elasticsearch.shield.transport.netty.ShieldNettyHttpServerTransport;
|
||||||
import org.elasticsearch.shield.transport.netty.ShieldNettyTransport;
|
import org.elasticsearch.shield.transport.netty.ShieldNettyTransport;
|
||||||
import org.elasticsearch.transport.TransportModule;
|
import org.elasticsearch.transport.TransportModule;
|
||||||
|
|
||||||
import java.io.Closeable;
|
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.security.AccessController;
|
import java.security.AccessController;
|
||||||
|
@ -179,13 +179,6 @@ public class ShieldPlugin extends Plugin {
|
||||||
clusterDynamicSettingsModule.registerClusterDynamicSetting(IPFilter.IP_FILTER_ENABLED_HTTP_SETTING, Validator.EMPTY);
|
clusterDynamicSettingsModule.registerClusterDynamicSetting(IPFilter.IP_FILTER_ENABLED_HTTP_SETTING, Validator.EMPTY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onIndexService(IndexService indexService) {
|
|
||||||
if (enabled && clientMode == false) {
|
|
||||||
failIfShieldQueryCacheIsNotActive(indexService.getIndexSettings().getSettings(), false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onIndexModule(IndexModule module) {
|
public void onIndexModule(IndexModule module) {
|
||||||
if (enabled == false) {
|
if (enabled == false) {
|
||||||
|
@ -199,6 +192,7 @@ public class ShieldPlugin extends Plugin {
|
||||||
}
|
}
|
||||||
if (clientMode == false) {
|
if (clientMode == false) {
|
||||||
module.registerQueryCache(ShieldPlugin.OPT_OUT_QUERY_CACHE, OptOutQueryCache::new);
|
module.registerQueryCache(ShieldPlugin.OPT_OUT_QUERY_CACHE, OptOutQueryCache::new);
|
||||||
|
failIfShieldQueryCacheIsNotActive(module.getSettings(), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue