Class BaseServiceProviderBuilder<T,B extends BaseServiceProviderBuilder<T,B,S>,S extends Serializer<T>>
java.lang.Object
io.appform.ranger.core.serviceprovider.BaseServiceProviderBuilder<T,B,S>
public abstract class BaseServiceProviderBuilder<T,B extends BaseServiceProviderBuilder<T,B,S>,S extends Serializer<T>>
extends Object
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<Signal<HealthcheckResult>>protected final List<Healthcheck>protected intprotected Stringprotected Stringprotected Tprotected NodeDataSink<T,S> protected intprotected Stringprotected Sprotected Stringprotected int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract ServiceProvider<T,S> build()protected final ServiceProvider<T,S> protected abstract NodeDataSink<T,S> withAdditionalRefreshSignal(Signal<HealthcheckResult> additionalRefreshSignal) withAdditionalRefreshSignals(List<Signal<HealthcheckResult>> additionalRefreshSignals) withHealthcheck(Healthcheck healthcheck) withHealthUpdateIntervalMs(int healthUpdateIntervalMs) withHostname(String hostname) Register a monitor to the service, to set up a continuous monitoring on the monitor this method can be used to add aIsolatedHealthMonitorwhich will later be scheduled at regular intervals and monitored to generate and maintain an aggregated health of the service the scheduling will happen in an isolated threadwithNamespace(String namespace) withNodeData(T nodeData) withNodeDataSource(NodeDataSink<T, S> nodeDataSource) withPort(int port) withPortScheme(String portScheme) withSerializer(S serializer) withServiceName(String serviceName) withStaleUpdateThresholdMs(int staleUpdateThresholdMs) withStartSignalHandler(Consumer<Void> startSignalHandler) withStartSignalHandlers(List<Consumer<Void>> startSignalHandlers) withStopSignalHandler(Consumer<Void> stopSignalHandler) withStopSignalHandlers(List<Consumer<Void>> stopSignalHandlers)
-
Field Details
-
namespace
-
serviceName
-
serializer
-
hostname
-
port
protected int port -
portScheme
-
nodeData
-
healthUpdateIntervalMs
protected int healthUpdateIntervalMs -
staleUpdateThresholdMs
protected int staleUpdateThresholdMs -
nodeDataSource
-
healthchecks
-
startSignalHandlers
-
stopSignalHandlers
-
additionalRefreshSignals
-
-
Constructor Details
-
BaseServiceProviderBuilder
public BaseServiceProviderBuilder()
-
-
Method Details
-
withNamespace
-
withServiceName
-
withSerializer
-
withHostname
-
withPort
-
withPortScheme
-
withNodeData
-
withHealthcheck
-
withHealthUpdateIntervalMs
-
withStaleUpdateThresholdMs
-
withIsolatedHealthMonitor
Register a monitor to the service, to set up a continuous monitoring on the monitor this method can be used to add aIsolatedHealthMonitorwhich will later be scheduled at regular intervals and monitored to generate and maintain an aggregated health of the service the scheduling will happen in an isolated thread- Parameters:
monitor- an implementation of theIsolatedHealthMonitor- Returns:
- builder for next call
-
withNodeDataSource
-
withStartSignalHandler
-
withStartSignalHandlers
-
withStopSignalHandler
-
withStopSignalHandlers
-
withAdditionalRefreshSignal
-
withAdditionalRefreshSignals
-
buildProvider
-
build
-
dataSink
-