Package org.elasticsearch.cluster
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 ClassesModifier and TypeClassDescriptionstatic 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
ConstructorsConstructorDescriptionMockInternalClusterInfoService(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 TypeMethodDescriptionorg.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
-
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
-
getClusterInfo
public org.elasticsearch.cluster.ClusterInfo getClusterInfo()- Specified by:
getClusterInfo
in interfaceorg.elasticsearch.cluster.ClusterInfoService
- Overrides:
getClusterInfo
in classorg.elasticsearch.cluster.InternalClusterInfoService
-
setUpdateFrequency
public void setUpdateFrequency(org.elasticsearch.core.TimeValue updateFrequency)
-