Class MockInternalClusterInfoService

java.lang.Object
org.elasticsearch.cluster.InternalClusterInfoService
org.elasticsearch.cluster.MockInternalClusterInfoService
All Implemented Interfaces:
org.elasticsearch.cluster.ClusterInfoService, org.elasticsearch.cluster.ClusterStateListener

public class MockInternalClusterInfoService extends org.elasticsearch.cluster.InternalClusterInfoService
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    This is a marker plugin used to trigger MockNode to use this mock info service.
  • Field Summary

    Fields inherited from class org.elasticsearch.cluster.InternalClusterInfoService

    INTERNAL_CLUSTER_INFO_TIMEOUT_SETTING, INTERNAL_CLUSTER_INFO_UPDATE_INTERVAL_SETTING
  • Constructor Summary

    Constructors
    Constructor
    Description
    MockInternalClusterInfoService​(org.elasticsearch.common.settings.Settings settings, org.elasticsearch.cluster.service.ClusterService clusterService, org.elasticsearch.threadpool.ThreadPool threadPool, org.elasticsearch.client.node.NodeClient client)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.elasticsearch.cluster.ClusterInfo
     
    void
    setDiskUsageFunctionAndRefresh​(BiFunction<org.elasticsearch.cluster.node.DiscoveryNode,​org.elasticsearch.monitor.fs.FsInfo.Path,​org.elasticsearch.monitor.fs.FsInfo.Path> diskUsageFunction)
     
    void
    setShardSizeFunctionAndRefresh​(Function<org.elasticsearch.cluster.routing.ShardRouting,​Long> shardSizeFunction)
     
    void
    setUpdateFrequency​(org.elasticsearch.core.TimeValue updateFrequency)
     

    Methods inherited from class org.elasticsearch.cluster.InternalClusterInfoService

    addListener, clusterChanged

    Methods inherited from class java.lang.Object

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

    • MockInternalClusterInfoService

      public MockInternalClusterInfoService(org.elasticsearch.common.settings.Settings settings, org.elasticsearch.cluster.service.ClusterService clusterService, org.elasticsearch.threadpool.ThreadPool threadPool, org.elasticsearch.client.node.NodeClient client)
  • Method Details

    • setDiskUsageFunctionAndRefresh

      public void setDiskUsageFunctionAndRefresh(BiFunction<org.elasticsearch.cluster.node.DiscoveryNode,​org.elasticsearch.monitor.fs.FsInfo.Path,​org.elasticsearch.monitor.fs.FsInfo.Path> diskUsageFunction)
    • setShardSizeFunctionAndRefresh

      public void setShardSizeFunctionAndRefresh(Function<org.elasticsearch.cluster.routing.ShardRouting,​Long> shardSizeFunction)
    • getClusterInfo

      public org.elasticsearch.cluster.ClusterInfo getClusterInfo()
      Specified by:
      getClusterInfo in interface org.elasticsearch.cluster.ClusterInfoService
      Overrides:
      getClusterInfo in class org.elasticsearch.cluster.InternalClusterInfoService
    • setUpdateFrequency

      public void setUpdateFrequency(org.elasticsearch.core.TimeValue updateFrequency)