org.elasticsearch.threadpool.ThreadPool.scheduler()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(5.7k)|赞(0)|评价(0)|浏览(131)

本文整理了Java中org.elasticsearch.threadpool.ThreadPool.scheduler()方法的一些代码示例,展示了ThreadPool.scheduler()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ThreadPool.scheduler()方法的具体详情如下:
包路径:org.elasticsearch.threadpool.ThreadPool
类名称:ThreadPool
方法名:scheduler

ThreadPool.scheduler介绍

暂无

代码示例

代码示例来源:origin: org.elasticsearch/elasticsearch

@Override
protected synchronized void doStart() {
  Objects.requireNonNull(nodeConnectionsService, "please set the node connection service before starting");
  Objects.requireNonNull(state.get(), "please set initial state before starting");
  addListener(localNodeMasterListeners);
  threadPoolExecutor = EsExecutors.newSinglePrioritizing(
      nodeName + "/" + CLUSTER_UPDATE_THREAD_NAME,
      daemonThreadFactory(nodeName, CLUSTER_UPDATE_THREAD_NAME),
      threadPool.getThreadContext(),
      threadPool.scheduler());
}

代码示例来源:origin: org.elasticsearch/elasticsearch

@Override
protected synchronized void doStart() {
  Objects.requireNonNull(clusterStatePublisher, "please set a cluster state publisher before starting");
  Objects.requireNonNull(clusterStateSupplier, "please set a cluster state supplier before starting");
  threadPoolExecutor = EsExecutors.newSinglePrioritizing(
      nodeName + "/" + MASTER_UPDATE_THREAD_NAME,
      daemonThreadFactory(nodeName, MASTER_UPDATE_THREAD_NAME),
      threadPool.getThreadContext(),
      threadPool.scheduler());
  taskBatcher = new Batcher(logger, threadPoolExecutor);
}

代码示例来源:origin: org.elasticsearch/elasticsearch

final String aId = shardRouting.allocationId().getId();
this.globalCheckpointListeners =
    new GlobalCheckpointListeners(shardId, threadPool.executor(ThreadPool.Names.LISTENER), threadPool.scheduler(), logger);
this.replicationTracker =
    new ReplicationTracker(shardId, aId, indexSettings, UNASSIGNED_SEQ_NO, globalCheckpointListeners::globalCheckpointUpdated);

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

@Override
protected synchronized void doStart() {
  Objects.requireNonNull(nodeConnectionsService, "please set the node connection service before starting");
  Objects.requireNonNull(state.get(), "please set initial state before starting");
  addListener(localNodeMasterListeners);
  threadPoolExecutor = EsExecutors.newSinglePrioritizing(
      nodeName() + "/" + CLUSTER_UPDATE_THREAD_NAME,
      daemonThreadFactory(settings, CLUSTER_UPDATE_THREAD_NAME),
      threadPool.getThreadContext(),
      threadPool.scheduler());
}

代码示例来源:origin: apache/servicemix-bundles

@Override
protected synchronized void doStart() {
  Objects.requireNonNull(nodeConnectionsService, "please set the node connection service before starting");
  Objects.requireNonNull(state.get(), "please set initial state before starting");
  addListener(localNodeMasterListeners);
  threadPoolExecutor = EsExecutors.newSinglePrioritizing(
      nodeName() + "/" + CLUSTER_UPDATE_THREAD_NAME,
      daemonThreadFactory(settings, CLUSTER_UPDATE_THREAD_NAME),
      threadPool.getThreadContext(),
      threadPool.scheduler());
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

@Override
protected synchronized void doStart() {
  Objects.requireNonNull(clusterStatePublisher, "please set a cluster state publisher before starting");
  Objects.requireNonNull(clusterStateSupplier, "please set a cluster state supplier before starting");
  threadPoolExecutor = EsExecutors.newSinglePrioritizing(
      nodeName() + "/" + MASTER_UPDATE_THREAD_NAME,
      daemonThreadFactory(settings, MASTER_UPDATE_THREAD_NAME),
      threadPool.getThreadContext(),
      threadPool.scheduler());
  taskBatcher = new Batcher(logger, threadPoolExecutor);
}

代码示例来源:origin: apache/servicemix-bundles

@Override
protected synchronized void doStart() {
  Objects.requireNonNull(clusterStatePublisher, "please set a cluster state publisher before starting");
  Objects.requireNonNull(clusterStateSupplier, "please set a cluster state supplier before starting");
  threadPoolExecutor = EsExecutors.newSinglePrioritizing(
      nodeName() + "/" + MASTER_UPDATE_THREAD_NAME,
      daemonThreadFactory(settings, MASTER_UPDATE_THREAD_NAME),
      threadPool.getThreadContext(),
      threadPool.scheduler());
  taskBatcher = new Batcher(logger, threadPoolExecutor);
}

代码示例来源:origin: harbby/presto-connectors

updateTasksExecutor.execute(updateTask, threadPool.scheduler(), timeout, new Runnable() {
  @Override
  public void run() {

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

@Override
protected synchronized void doStart() {
  Objects.requireNonNull(clusterStatePublisher, "please set a cluster state publisher before starting");
  Objects.requireNonNull(nodeConnectionsService, "please set the node connection service before starting");
  Objects.requireNonNull(discoverySettings, "please set discovery settings before starting");
  addListener(localNodeMasterListeners);
  DiscoveryNode localNode = localNodeSupplier.get();
  assert localNode != null;
  updateState(state -> {
    assert state.nodes().getLocalNodeId() == null : "local node is already set";
    DiscoveryNodes nodes = DiscoveryNodes.builder(state.nodes()).add(localNode).localNodeId(localNode.getId()).build();
    return ClusterState.builder(state).nodes(nodes).blocks(initialBlocks).build();
  });
  this.threadPoolExecutor = EsExecutors.newSinglePrioritizing(UPDATE_THREAD_NAME,
    daemonThreadFactory(settings, UPDATE_THREAD_NAME), threadPool.getThreadContext(), threadPool.scheduler());
  this.taskBatcher = new ClusterServiceTaskBatcher(logger, threadPoolExecutor);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

final String aId = shardRouting.allocationId().getId();
this.globalCheckpointListeners =
    new GlobalCheckpointListeners(shardId, threadPool.executor(ThreadPool.Names.LISTENER), threadPool.scheduler(), logger);
this.replicationTracker =
    new ReplicationTracker(shardId, aId, indexSettings, UNASSIGNED_SEQ_NO, globalCheckpointListeners::globalCheckpointUpdated);

相关文章