List of usage examples for io.vertx.core.shareddata SharedData getLockWithTimeout
void getLockWithTimeout(String name, long timeout, Handler<AsyncResult<Lock>> resultHandler);
From source file:examples.SharedDataExamples.java
License:Open Source License
public void example6(SharedData sd) { sd.getLockWithTimeout("mylock", 10000, res -> { if (res.succeeded()) { // Got the lock! Lock lock = res.result(); } else {/*from www . j ava 2 s . co m*/ // Failed to get lock } }); }