implicit final class VertxVertxOps extends AnyVal
- Alphabetic
- By Inheritance
- VertxVertxOps
- AnyVal
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new VertxVertxOps(target: Vertx)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- Any
- final def ##(): Int
- Definition Classes
- Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def closeL(): Task[Unit]
Like
#close
but the completionHandler will be called when the close is complete - def deployVerticleL(name: String, options: DeploymentOptions): Task[String]
Like
Handler)
butio.vertx.core.DeploymentOptions
are provided to configure the deployment.Like
Handler)
butio.vertx.core.DeploymentOptions
are provided to configure the deployment.- name
the name
- options
the deployment options.
- def deployVerticleL(name: String): Task[String]
Like
#deployVerticle(String)
but the completionHandler will be notified when the deployment is complete.Like
#deployVerticle(String)
but the completionHandler will be notified when the deployment is complete.If the deployment is successful the result will contain a String representing the unique deployment ID of the deployment.
This deployment ID can subsequently be used to undeploy the verticle.
- name
The identifier
- def executeBlockingL[T](blockingCodeHandler: Handler[Promise[T]]): Task[T]
Like
boolean, Handler)
called with ordered = true. - def executeBlockingL[T](blockingCodeHandler: Handler[Promise[T]], ordered: Boolean): Task[T]
Safely execute some blocking code.
Safely execute some blocking code.
Executes the blocking code in the handler
blockingCodeHandler
using a thread from the worker pool.When the code is complete the handler
resultHandler
will be called with the result on the original context (e.g. on the original event loop of the caller).A
Future
instance is passed intoblockingCodeHandler
. When the blocking code successfully completes, the handler should call thePromise#complete
orPromise#complete(Object)
method, or thePromise#fail
method if it failed.In the
blockingCodeHandler
the current context remains the original context and therefore any task scheduled in theblockingCodeHandler
will be executed on the this context and not on the worker thread.The blocking code should block for a reasonable amount of time (i.e no more than a few seconds). Long blocking operations or polling operations (i.e a thread that spin in a loop polling events in a blocking fashion) are precluded.
When the blocking operation lasts more than the 10 seconds, a message will be printed on the console by the blocked thread checker.
Long blocking operations should use a dedicated thread managed by the application, which can interact with verticles using the event-bus or
Context#runOnContext(Handler)
- blockingCodeHandler
handler representing the blocking code to run
- ordered
if true then if executeBlocking is called several times on the same context, the executions for that context will be executed serially, not in parallel. if false then they will be no ordering guarantees
- def getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val target: Vertx
- def toString(): String
- Definition Classes
- Any
- def undeployL(deploymentID: String): Task[Unit]
Like
but the completionHandler will be notified when the undeployment is complete.
Like
but the completionHandler will be notified when the undeployment is complete.
- deploymentID
the deployment ID