Class UsageService


  • public class UsageService
    extends java.lang.Object
    A service to monitor usage of Elasticsearch features.
    • Constructor Summary

      Constructors 
      Constructor Description
      UsageService()  
    • Method Summary

      Modifier and Type Method Description
      void addRestHandler​(BaseRestHandler handler)
      Add a REST handler to this service.
      NodeUsage getUsageStats​(DiscoveryNode localNode, boolean restActions)
      Get the current usage statistics for this node.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UsageService

        public UsageService()
    • Method Detail

      • addRestHandler

        public void addRestHandler​(BaseRestHandler handler)
        Add a REST handler to this service.
        Parameters:
        handler - the BaseRestHandler to add to the usage service.
      • getUsageStats

        public NodeUsage getUsageStats​(DiscoveryNode localNode,
                                       boolean restActions)
        Get the current usage statistics for this node.
        Parameters:
        localNode - the DiscoveryNode for this node
        restActions - whether to include rest action usage in the returned statistics
        Returns:
        the NodeUsage representing the usage statistics for this node