当前位置: 首页>>代码示例>>Java>>正文


Java ClusterService.addLowPriorityApplier方法代码示例

本文整理汇总了Java中org.elasticsearch.cluster.service.ClusterService.addLowPriorityApplier方法的典型用法代码示例。如果您正苦于以下问题:Java ClusterService.addLowPriorityApplier方法的具体用法?Java ClusterService.addLowPriorityApplier怎么用?Java ClusterService.addLowPriorityApplier使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.elasticsearch.cluster.service.ClusterService的用法示例。


在下文中一共展示了ClusterService.addLowPriorityApplier方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: SnapshotShardsService

import org.elasticsearch.cluster.service.ClusterService; //导入方法依赖的package包/类
@Inject
public SnapshotShardsService(Settings settings, ClusterService clusterService, SnapshotsService snapshotsService, ThreadPool threadPool,
                             TransportService transportService, IndicesService indicesService) {
    super(settings);
    this.indicesService = indicesService;
    this.snapshotsService = snapshotsService;
    this.transportService = transportService;
    this.clusterService = clusterService;
    this.threadPool = threadPool;
    if (DiscoveryNode.isDataNode(settings)) {
        // this is only useful on the nodes that can hold data
        // addLowPriorityApplier to make sure that Repository will be created before snapshot
        clusterService.addLowPriorityApplier(this);
    }

    if (DiscoveryNode.isMasterNode(settings)) {
        // This needs to run only on nodes that can become masters
        transportService.registerRequestHandler(UPDATE_SNAPSHOT_ACTION_NAME, UpdateIndexShardSnapshotStatusRequest::new, ThreadPool.Names.SAME, new UpdateSnapshotStateRequestHandler());
    }

}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:22,代码来源:SnapshotShardsService.java

示例2: Gateway

import org.elasticsearch.cluster.service.ClusterService; //导入方法依赖的package包/类
public Gateway(Settings settings, ClusterService clusterService, GatewayMetaState metaState,
               TransportNodesListGatewayMetaState listGatewayMetaState, Discovery discovery,
               IndicesService indicesService) {
    super(settings);
    this.indicesService = indicesService;
    this.clusterService = clusterService;
    this.metaState = metaState;
    this.listGatewayMetaState = listGatewayMetaState;
    this.minimumMasterNodesProvider = discovery::getMinimumMasterNodes;
    clusterService.addLowPriorityApplier(this);
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:12,代码来源:Gateway.java

示例3: SnapshotsService

import org.elasticsearch.cluster.service.ClusterService; //导入方法依赖的package包/类
@Inject
public SnapshotsService(Settings settings, ClusterService clusterService, IndexNameExpressionResolver indexNameExpressionResolver, RepositoriesService repositoriesService, ThreadPool threadPool) {
    super(settings);
    this.clusterService = clusterService;
    this.indexNameExpressionResolver = indexNameExpressionResolver;
    this.repositoriesService = repositoriesService;
    this.threadPool = threadPool;

    if (DiscoveryNode.isMasterNode(settings)) {
        // addLowPriorityApplier to make sure that Repository will be created before snapshot
        clusterService.addLowPriorityApplier(this);
    }
}
 
开发者ID:justor,项目名称:elasticsearch_my,代码行数:14,代码来源:SnapshotsService.java


注:本文中的org.elasticsearch.cluster.service.ClusterService.addLowPriorityApplier方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。