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 classMockInternalClusterInfoService.TestPluginThis 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>diskUsageFunctionjava.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, java.util.function.Consumer<ClusterInfo> listener)
-
Method Summary
Modifier and Type Method Description ClusterInfogetClusterInfo()voidsetUpdateFrequency(TimeValue updateFrequency)-
Methods inherited from class org.elasticsearch.cluster.InternalClusterInfoService
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, java.util.function.Consumer<ClusterInfo> listener)
-
-
Method Detail
-
getClusterInfo
public ClusterInfo getClusterInfo()
- Specified by:
getClusterInfoin interfaceClusterInfoService- Overrides:
getClusterInfoin classInternalClusterInfoService
-
setUpdateFrequency
public void setUpdateFrequency(TimeValue updateFrequency)
-
-