Package org.elasticsearch.cluster
Class MockInternalClusterInfoService
- java.lang.Object
-
- org.elasticsearch.cluster.InternalClusterInfoService
-
- org.elasticsearch.cluster.MockInternalClusterInfoService
-
- All Implemented Interfaces:
ClusterInfoService
,ClusterStateListener
,LocalNodeMasterListener
public class MockInternalClusterInfoService extends InternalClusterInfoService
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MockInternalClusterInfoService.TestPlugin
This is a marker plugin used to trigger MockNode to use this mock info service.-
Nested classes/interfaces inherited from class org.elasticsearch.cluster.InternalClusterInfoService
InternalClusterInfoService.SubmitReschedulingClusterInfoUpdatedJob
-
-
Field Summary
Fields Modifier and Type Field Description java.util.function.BiFunction<DiscoveryNode,FsInfo.Path,FsInfo.Path>
diskUsageFunction
java.util.function.Function<ShardRouting,java.lang.Long>
shardSizeFunction
-
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(Settings settings, ClusterService clusterService, ThreadPool threadPool, NodeClient client)
-
Method Summary
Modifier and Type Method Description ClusterInfo
getClusterInfo()
void
setUpdateFrequency(TimeValue updateFrequency)
-
Methods inherited from class org.elasticsearch.cluster.InternalClusterInfoService
addListener, clusterChanged, executorName, offMaster, onMaster, refresh, updateIndicesStats, updateNodeStats
-
-
-
-
Field Detail
-
shardSizeFunction
@Nullable public volatile java.util.function.Function<ShardRouting,java.lang.Long> shardSizeFunction
-
diskUsageFunction
@Nullable public volatile java.util.function.BiFunction<DiscoveryNode,FsInfo.Path,FsInfo.Path> diskUsageFunction
-
-
Constructor Detail
-
MockInternalClusterInfoService
public MockInternalClusterInfoService(Settings settings, ClusterService clusterService, ThreadPool threadPool, NodeClient client)
-
-
Method Detail
-
getClusterInfo
public ClusterInfo getClusterInfo()
- Specified by:
getClusterInfo
in interfaceClusterInfoService
- Overrides:
getClusterInfo
in classInternalClusterInfoService
-
setUpdateFrequency
public void setUpdateFrequency(TimeValue updateFrequency)
-
-