Class HeapMemoryHealthCheck.Builder
java.lang.Object
io.helidon.health.checks.HeapMemoryHealthCheck.Builder
- All Implemented Interfaces:
Builder<HeapMemoryHealthCheck.Builder, HeapMemoryHealthCheck>, Supplier<HeapMemoryHealthCheck>
- Enclosing class:
HeapMemoryHealthCheck
public static final class HeapMemoryHealthCheck.Builder
extends Object
implements Builder<HeapMemoryHealthCheck.Builder, HeapMemoryHealthCheck>
Fluent API builder for
HeapMemoryHealthCheck.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the instance from this builder.Set up the heap space health check via config key, if present.thresholdPercent(double threshold) Threshol percentage.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Builder
get, identity, updateModifier and TypeMethodDescriptiondefault HeapMemoryHealthCheckget()default HeapMemoryHealthCheck.Builderidentity()Instance of this builder as the correct type.default HeapMemoryHealthCheck.Builderupdate(Consumer<HeapMemoryHealthCheck.Builder> consumer) Update the builder in a fluent API way.
-
Method Details
-
build
Description copied from interface:BuilderBuild the instance from this builder.- Specified by:
buildin interfaceBuilder<HeapMemoryHealthCheck.Builder, HeapMemoryHealthCheck>- Returns:
- instance of the built type
-
thresholdPercent
Threshol percentage. If used memory is above this threshold, reports the system is down.- Parameters:
threshold- threshold percentage (e.g. 87.47)- Returns:
- updated builder instance
-
config
Set up the heap space health check via config key, if present. Configuration options:Heap space health check configuration Key Default Value Description Builder method "thresholdPercent" 98.0 Minimum percent of heap memory consumed for this health check to fail thresholdPercent(double)- Parameters:
config-Confignode for heap memory- Returns:
- updated builder instance
-