Examples of HealthCheck


Examples of com.amazonaws.services.elasticloadbalancing.model.HealthCheck

          .withLoadBalancerName(this.loadBalancerName)
          .withAvailabilityZones(this.availabilityZones)
          .withListeners(this.portForwarding);
      CreateLoadBalancerResult result = getClient().getApi()
          .createLoadBalancer(request);
      HealthCheck healthCheck = new HealthCheck().withTarget("HTTP:80/")
          .withInterval(10).withUnhealthyThreshold(3).withTimeout(5)
          .withHealthyThreshold(3);
      getClient()
          .getApi()
          .configureHealthCheck(
View Full Code Here

Examples of com.codahale.metrics.health.HealthCheck

                .isEqualTo("application/json");
    }

    @Test
    public void returnsA200IfAllHealthChecksAreHealthy() throws Exception {
        registry.register("fun", new HealthCheck() {
            @Override
            protected Result check() throws Exception {
                return Result.healthy("whee");
            }
        });
View Full Code Here

Examples of com.codahale.metrics.health.HealthCheck

                .isEqualTo("application/json");
    }

    @Test
    public void returnsA500IfAnyHealthChecksAreUnhealthy() throws Exception {
        registry.register("fun", new HealthCheck() {
            @Override
            protected Result check() throws Exception {
                return Result.healthy("whee");
            }
        });

        registry.register("notFun", new HealthCheck() {
            @Override
            protected Result check() throws Exception {
                return Result.unhealthy("whee");
            }
        });
View Full Code Here

Examples of com.codahale.metrics.health.HealthCheck

                .isEqualTo("application/json");
    }

    @Test
    public void optionallyPrettyPrintsTheJson() throws Exception {
        registry.register("fun", new HealthCheck() {
            @Override
            protected Result check() throws Exception {
                return Result.healthy("whee");
            }
        });
View Full Code Here

Examples of com.codahale.metrics.health.HealthCheck

    }

    private void loadHealthCheckBeans(List<String> healthChecks, ApplicationContext ctx, Environment env) {
        if (healthChecks != null) {
            for (String healthCheck : healthChecks) {
                HealthCheck healthCheckBean = (HealthCheck) ctx.getBean(healthCheck);
                env.healthChecks().register(healthCheck, healthCheckBean);
            }
        }
    }
View Full Code Here

Examples of com.codahale.metrics.health.HealthCheck

        });
        metricRegistry.counter("counter1").inc(74);
        metricRegistry.meter("meter1");
        metricRegistry.histogram("histogram1");

        healthCheckRegistry.register("hc1", new HealthCheck() {
            @Override
            protected Result check() throws Exception {
                return Result.healthy("yay");
            }
        });
View Full Code Here

Examples of com.codahale.metrics.health.HealthCheck

   
    MetricRegistry metricRegistry = new MetricRegistry();
    metricRegistry.register("myCounter", new Counter());
   
    HealthCheckRegistry healthChecks = new HealthCheckRegistry();
    healthChecks.register("foo", new HealthCheck() {     
      @Override
      protected Result check() throws Exception {
        return Result.healthy("flawless");
      }
    });
View Full Code Here

Examples of com.codahale.metrics.health.HealthCheck

   
    MetricRegistry metricRegistry = new MetricRegistry();
    metricRegistry.register("myCounter", new Counter());
   
    HealthCheckRegistry healthChecks = new HealthCheckRegistry();
    healthChecks.register("foo", new HealthCheck() {     
      @Override
      protected Result check() throws Exception {
        return Result.healthy("flawless");
      }
    });
View Full Code Here

Examples of com.yammer.metrics.core.HealthCheck

        this.mongo = mongo;
    }

    @Override
    protected void doStart() {
        HealthChecks.register(new HealthCheck(HEALTH_CHECK_NAME) {
            @Override
            protected Result check() throws Exception {
                try {
                    mongo.getDatabaseNames();
                    return Result.healthy(mongo.debugString());
View Full Code Here

Examples of com.yammer.metrics.core.HealthCheck

    private MetricsHealthCheck check;

    public YammerHealthCheck( Class<?> origin, String name, final MetricsHealthCheck check )
    {
        this.check = check;
        HealthChecks.register( new HealthCheck( name )
        {
            @Override
            protected Result check()
                throws Exception
            {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.