I have created a vertx AsyncMap< Long, Context > where I store dropwizard timer for a specific jobId. But when I put any value to map I am getting "java.lang.IllegalArgumentException: Invalid type: class com.codahale.metrics.Timer$Context to put in async map" error.
Code for map initialization:
vertxService.getVertx().sharedData().<Long,Context>getClusterWideMap("mapName", ar -> {
if(ar.succeeded()){
tempAsyncMap = ar.result();
}else{
log.error("Not able to get cluster wide map with name due to {}:",ar.cause());
}
});
code for putting timer to map:
tempAsyncMap.put(jobId, jobWaitTimer.time(), completionHandler -> {});
I have created a vertx AsyncMap< Long, Context > where I store dropwizard timer for a specific jobId. But when I put any value to map I am getting "java.lang.IllegalArgumentException: Invalid type: class com.codahale.metrics.Timer$Context to put in async map" error.
Code for map initialization:
code for putting timer to map:
tempAsyncMap.put(jobId, jobWaitTimer.time(), completionHandler -> {});