HotThreads.php 970 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. namespace Elasticsearch\Endpoints\Cluster\Nodes;
  3. /**
  4. * Class Hotthreads
  5. *
  6. * @category Elasticsearch
  7. * @package Elasticsearch\Endpoints\Cluster\Nodes
  8. * @author Zachary Tong <zach@elastic.co>
  9. * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2
  10. * @link http://elastic.co
  11. */
  12. class HotThreads extends AbstractNodesEndpoint
  13. {
  14. /**
  15. * @return string
  16. */
  17. public function getURI()
  18. {
  19. $node_id = $this->nodeID;
  20. $uri = "/_cluster/nodes/hotthreads";
  21. if (isset($node_id) === true) {
  22. $uri = "/_cluster/nodes/$node_id/hotthreads";
  23. }
  24. return $uri;
  25. }
  26. /**
  27. * @return string[]
  28. */
  29. public function getParamWhitelist()
  30. {
  31. return array(
  32. 'interval',
  33. 'snapshots',
  34. 'threads',
  35. 'type',
  36. );
  37. }
  38. /**
  39. * @return string
  40. */
  41. public function getMethod()
  42. {
  43. return 'GET';
  44. }
  45. }