Example usage for io.vertx.core Vertx createSharedWorkerExecutor

List of usage examples for io.vertx.core Vertx createSharedWorkerExecutor

Introduction

In this page you can find the example usage for io.vertx.core Vertx createSharedWorkerExecutor.

Prototype

WorkerExecutor createSharedWorkerExecutor(String name, int poolSize, long maxExecuteTime);

Source Link

Document

Like #createSharedWorkerExecutor(String,int,long,TimeUnit) but with the TimeUnit#NANOSECONDS ns unit .

Usage

From source file:examples.CoreExamples.java

License:Open Source License

public void workerExecutor3(Vertx vertx) {
    ////from w  w w  . j  a  v  a  2  s.  c o  m
    // 10 threads max
    int poolSize = 10;

    // 2 minutes
    long maxExecuteTime = 120000;

    WorkerExecutor executor = vertx.createSharedWorkerExecutor("my-worker-pool", poolSize, maxExecuteTime);
}