E.g., (you should actually check if the async results succeeded too, but i did not to save space...)
vertx.sharedData().getClusterWideMap("timermap", asyncResult -> { asyncResult.result().putIfAbsent("some timer name", this.deploymentID(), putAsyncResult -> {
if (putAsyncResult.result() != null) {
// a previous verticle set the id, check the cluster to see if it's still up
} else {
// successfully set to this verticle deployment ID. setup your timer
}
})
})
Also note that code probably wont work verbatim as I havent tested it and it's just something to give you an idea real quick.