use of io.vertx.ext.cluster.infinispan.InfinispanClusterManager in project vertx-openshift-it by cescoffier.
the class EventBusSenderVerticle method createHealthChecks.
private HealthChecks createHealthChecks() {
return HealthChecks.create(vertx).register("ispn-cluster-status", future -> {
VertxInternal vertxInternal = (VertxInternal) vertx;
InfinispanClusterManager clusterManager = (InfinispanClusterManager) vertxInternal.getClusterManager();
EmbeddedCacheManager cacheManager = (EmbeddedCacheManager) clusterManager.getCacheContainer();
Health health = cacheManager.getHealth();
HealthStatus healthStatus = health.getClusterHealth().getHealthStatus();
Status status = new Status().setOk(healthStatus == HealthStatus.HEALTHY).setData(JsonObject.mapFrom(health));
future.complete(status);
});
}
use of io.vertx.ext.cluster.infinispan.InfinispanClusterManager in project vertx-openshift-it by cescoffier.
the class AsyncMapVerticle method createHealthChecks.
private HealthChecks createHealthChecks() {
return HealthChecks.create(vertx).register("ispn-cluster-status", future -> {
VertxInternal vertxInternal = (VertxInternal) vertx;
InfinispanClusterManager clusterManager = (InfinispanClusterManager) vertxInternal.getClusterManager();
EmbeddedCacheManager cacheManager = (EmbeddedCacheManager) clusterManager.getCacheContainer();
Health health = cacheManager.getHealth();
HealthStatus healthStatus = health.getClusterHealth().getHealthStatus();
Status status = new Status().setOk(healthStatus == HealthStatus.HEALTHY).setData(JsonObject.mapFrom(health));
future.complete(status);
});
}
use of io.vertx.ext.cluster.infinispan.InfinispanClusterManager in project vertx-openshift-it by cescoffier.
the class EventBusReceiverVerticle method createHealthChecks.
private HealthChecks createHealthChecks() {
return HealthChecks.create(vertx).register("ispn-cluster-status", future -> {
VertxInternal vertxInternal = (VertxInternal) vertx;
InfinispanClusterManager clusterManager = (InfinispanClusterManager) vertxInternal.getClusterManager();
EmbeddedCacheManager cacheManager = (EmbeddedCacheManager) clusterManager.getCacheContainer();
Health health = cacheManager.getHealth();
HealthStatus healthStatus = health.getClusterHealth().getHealthStatus();
Status status = new Status().setOk(healthStatus == HealthStatus.HEALTHY).setData(JsonObject.mapFrom(health));
future.complete(status);
});
}
Aggregations