diff --git a/pom.xml b/pom.xml index e22046db..4be0eaa3 100644 --- a/pom.xml +++ b/pom.xml @@ -7,16 +7,16 @@ io.vertx vertx-parent - 3.0.0-SNAPSHOT + 3.0.0-dev_preview1 vertx-lang-groovy - 3.0.0-SNAPSHOT + 3.0.0-dev_preview1 Vert.x Groovy Language Support - 3.0.0-SNAPSHOT + 3.0.0-dev_preview1 ${project.basedir}/src/main/asciidoc diff --git a/src/main/asciidoc/index.adoc b/src/main/asciidoc/index.adoc index 746af4df..712500c4 100644 --- a/src/main/asciidoc/index.adoc +++ b/src/main/asciidoc/index.adoc @@ -3,14 +3,6 @@ = Vert.x API manual -== The Event Bus - -include::io.vertx.core.eventbus.adoc[] - -== Buffers - -include::io.vertx.core.buffer.adoc[] - == Flow Control - Streams and Pumps include::io.vertx.core.streams.adoc[] \ No newline at end of file diff --git a/src/main/groovy/io/vertx/groovy/core/shareddata/AsyncMap.groovy b/src/main/groovy/io/vertx/groovy/core/shareddata/AsyncMap.groovy index c6abc3eb..8c162390 100644 --- a/src/main/groovy/io/vertx/groovy/core/shareddata/AsyncMap.groovy +++ b/src/main/groovy/io/vertx/groovy/core/shareddata/AsyncMap.groovy @@ -62,6 +62,9 @@ public class AsyncMap { public void put(K k, V v, Handler> completionHandler) { ((io.vertx.core.shareddata.AsyncMap) this.delegate).put(InternalHelper.unwrapObject(k), InternalHelper.unwrapObject(v), completionHandler); } + public void put(K k, V v, long timeout, Handler> completionHandler) { + ((io.vertx.core.shareddata.AsyncMap) this.delegate).put(InternalHelper.unwrapObject(k), InternalHelper.unwrapObject(v), timeout, completionHandler); + } public void putIfAbsent(K k, V v, Handler> completionHandler) { ((io.vertx.core.shareddata.AsyncMap) this.delegate).putIfAbsent(InternalHelper.unwrapObject(k), InternalHelper.unwrapObject(v), new Handler>() { public void handle(AsyncResult event) { @@ -75,6 +78,19 @@ public class AsyncMap { } }); } + public void putIfAbsent(K k, V v, long timeout, Handler> completionHandler) { + ((io.vertx.core.shareddata.AsyncMap) this.delegate).putIfAbsent(InternalHelper.unwrapObject(k), InternalHelper.unwrapObject(v), timeout, new Handler>() { + public void handle(AsyncResult event) { + AsyncResult f + if (event.succeeded()) { + f = InternalHelper.result(InternalHelper.wrapObject(event.result())) + } else { + f = InternalHelper.failure(event.cause()) + } + completionHandler.handle(f) + } + }); + } /** * Remove a value from the map, asynchronously. * @param k The key @@ -115,6 +131,9 @@ public class AsyncMap { public void clear(Handler> resultHandler) { ((io.vertx.core.shareddata.AsyncMap) this.delegate).clear(resultHandler); } + public void size(Handler> resultHandler) { + ((io.vertx.core.shareddata.AsyncMap) this.delegate).size(resultHandler); + } static final java.util.function.Function FACTORY = io.vertx.lang.groovy.Factories.createFactory() { io.vertx.core.shareddata.AsyncMap arg -> new AsyncMap(arg);