Class FlushCacheApiAction

  • All Implemented Interfaces:
    org.elasticsearch.rest.RestHandler

    public class FlushCacheApiAction
    extends AbstractApiAction
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.elasticsearch.rest.BaseRestHandler

        org.elasticsearch.rest.BaseRestHandler.RestChannelConsumer, org.elasticsearch.rest.BaseRestHandler.Wrapper
      • Nested classes/interfaces inherited from interface org.elasticsearch.rest.RestHandler

        org.elasticsearch.rest.RestHandler.Route
    • Constructor Summary

      Constructors 
      Constructor Description
      FlushCacheApiAction​(org.elasticsearch.common.settings.Settings settings, Path configPath, org.elasticsearch.rest.RestController controller, org.elasticsearch.client.Client client, com.floragunn.searchguard.configuration.AdminDNs adminDNs, com.floragunn.searchguard.configuration.ConfigurationRepository cl, com.floragunn.searchguard.sgconf.StaticSgConfig staticSgConfig, org.elasticsearch.cluster.service.ClusterService cs, com.floragunn.searchguard.ssl.transport.PrincipalExtractor principalExtractor, com.floragunn.searchguard.privileges.PrivilegesEvaluator evaluator, com.floragunn.searchguard.privileges.SpecialPrivilegesEvaluationContextProviderRegistry specialPrivilegesEvaluationContextProviderRegistry, org.elasticsearch.threadpool.ThreadPool threadPool, com.floragunn.searchguard.auditlog.AuditLog auditLog)  
    • Constructor Detail

      • FlushCacheApiAction

        @Inject
        public FlushCacheApiAction​(org.elasticsearch.common.settings.Settings settings,
                                   Path configPath,
                                   org.elasticsearch.rest.RestController controller,
                                   org.elasticsearch.client.Client client,
                                   com.floragunn.searchguard.configuration.AdminDNs adminDNs,
                                   com.floragunn.searchguard.configuration.ConfigurationRepository cl,
                                   com.floragunn.searchguard.sgconf.StaticSgConfig staticSgConfig,
                                   org.elasticsearch.cluster.service.ClusterService cs,
                                   com.floragunn.searchguard.ssl.transport.PrincipalExtractor principalExtractor,
                                   com.floragunn.searchguard.privileges.PrivilegesEvaluator evaluator,
                                   com.floragunn.searchguard.privileges.SpecialPrivilegesEvaluationContextProviderRegistry specialPrivilegesEvaluationContextProviderRegistry,
                                   org.elasticsearch.threadpool.ThreadPool threadPool,
                                   com.floragunn.searchguard.auditlog.AuditLog auditLog)
    • Method Detail

      • routes

        public List<org.elasticsearch.rest.RestHandler.Route> routes()
        Specified by:
        routes in interface org.elasticsearch.rest.RestHandler
        Specified by:
        routes in class org.elasticsearch.rest.BaseRestHandler
      • handleDelete

        protected void handleDelete​(org.elasticsearch.rest.RestChannel channel,
                                    org.elasticsearch.rest.RestRequest request,
                                    org.elasticsearch.client.Client client,
                                    com.fasterxml.jackson.databind.JsonNode content)
                             throws IOException
        Overrides:
        handleDelete in class AbstractApiAction
        Throws:
        IOException
      • handlePost

        protected void handlePost​(org.elasticsearch.rest.RestChannel channel,
                                  org.elasticsearch.rest.RestRequest request,
                                  org.elasticsearch.client.Client client,
                                  com.fasterxml.jackson.databind.JsonNode content)
                           throws IOException
        Overrides:
        handlePost in class AbstractApiAction
        Throws:
        IOException
      • handleGet

        protected void handleGet​(org.elasticsearch.rest.RestChannel channel,
                                 org.elasticsearch.rest.RestRequest request,
                                 org.elasticsearch.client.Client client,
                                 com.fasterxml.jackson.databind.JsonNode content)
                          throws IOException
        Overrides:
        handleGet in class AbstractApiAction
        Throws:
        IOException
      • handlePut

        protected void handlePut​(org.elasticsearch.rest.RestChannel channel,
                                 org.elasticsearch.rest.RestRequest request,
                                 org.elasticsearch.client.Client client,
                                 com.fasterxml.jackson.databind.JsonNode content)
                          throws IOException
        Overrides:
        handlePut in class AbstractApiAction
        Throws:
        IOException
      • consumeParameters

        protected void consumeParameters​(org.elasticsearch.rest.RestRequest request)
        Description copied from class: AbstractApiAction
        Consume all defined parameters for the request. Before we handle the request in subclasses where we actually need the parameter, some global checks are performed, e.g. check whether the SG index exists. Thus, the parameter(s) have not been consumed, and ES will always return a 400 with an internal error message.
        Overrides:
        consumeParameters in class AbstractApiAction