/** * Registers a Health Check with the Agent. * * @param checkId The Check ID to use. Must be unique for the Agent. * @param name The Check Name. * @param ttl Time to live for the Consul dead man's switch. * @param notes Human readable notes. Not used by Consul. */ public void registerCheck(String checkId, String name, long ttl, String notes) { Check check = ImmutableCheck.builder() .id(checkId) .name(name) .ttl(String.format("%ss", ttl)) .notes(Optional.ofNullable(notes)) .build(); registerCheck(check); }
ttl(ttlOptional);
builder.ttl(json.ttl);