Example usage for io.vertx.core Context deploymentID

List of usage examples for io.vertx.core Context deploymentID

Introduction

In this page you can find the example usage for io.vertx.core Context deploymentID.

Prototype

String deploymentID();

Source Link

Document

If the context is associated with a Verticle deployment, this returns the deployment ID of that deployment.

Usage

From source file:co.runrightfast.vertx.core.RunRightFastVerticle.java

License:Apache License

/**
 * Performs the following:// w  w  w .  j  a va 2  s  .  c om
 *
 * <ol>
 * <li>initializes the metric registry
 * <li>initializes the healthcheck regsistry
 * </ol>
 *
 * @param vertx Vertx
 * @param context Context
 */
@Override
public final void init(final Vertx vertx, final Context context) {
    super.init(vertx, context);
    this.metricRegistry = SharedMetricRegistries.getOrCreate(getRunRightFastVerticleId().toString());
    this.healthCheckRegistry = SharedHealthCheckRegistries.getOrCreate(getRunRightFastVerticleId().toString());
    this.instanceId = instanceSequence.incrementAndGet();
    this.verticleInstanceId = new RunRightFastVerticleInstanceId(getRunRightFastVerticleId(), instanceId,
            context.deploymentID());
    info.log("init", () -> lifeCycleMsg("initialized"));
}