}
lock.acquire(timeout, resultHandler);
}
private void getLocalCounter(String name, Handler<AsyncResult<Counter>> resultHandler) {
Counter counter = new AsynchronousCounter(vertx);
Counter prev = localCounters.putIfAbsent(name, counter);
if (prev != null) {
counter = prev;
}
Counter theCounter = counter;
Context context = vertx.getOrCreateContext();
context.runOnContext(v -> resultHandler.handle(Future.completedFuture(theCounter)));
}