Package org.apache.pekko.remote
Class DefaultFailureDetectorRegistry<A>
java.lang.Object
org.apache.pekko.remote.DefaultFailureDetectorRegistry<A>
- All Implemented Interfaces:
FailureDetectorRegistry<A>
A lock-less thread-safe implementation of
FailureDetectorRegistry.
param: detectorFactory By-name parameter that returns the failure detector instance to be used by a newly registered resource
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultFailureDetectorRegistry(scala.Function0<FailureDetector> detectorFactory) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidRecords a heartbeat for a resource.final booleanisAvailable(A resource) Returns true if the resource is considered to be up and healthy and returns false otherwise.final booleanisMonitoring(A resource) Returns true if the failure detector has received any heartbeats and started monitoring of the resource.final voidRemoves the heartbeat management for a resource.final voidreset()Removes all resources and any associated failure detector state.
-
Constructor Details
-
DefaultFailureDetectorRegistry
-
-
Method Details
-
heartbeat
Description copied from interface:FailureDetectorRegistryRecords a heartbeat for a resource. If the resource is not yet registered (i.e. this is the first heartbeat) then it is automatically registered.- Specified by:
heartbeatin interfaceFailureDetectorRegistry<A>
-
isAvailable
Description copied from interface:FailureDetectorRegistryReturns true if the resource is considered to be up and healthy and returns false otherwise. For unregistered resources it returns true.- Specified by:
isAvailablein interfaceFailureDetectorRegistry<A>
-
isMonitoring
Description copied from interface:FailureDetectorRegistryReturns true if the failure detector has received any heartbeats and started monitoring of the resource.- Specified by:
isMonitoringin interfaceFailureDetectorRegistry<A>
-
remove
Description copied from interface:FailureDetectorRegistryRemoves the heartbeat management for a resource.- Specified by:
removein interfaceFailureDetectorRegistry<A>
-
reset
public final void reset()Description copied from interface:FailureDetectorRegistryRemoves all resources and any associated failure detector state.- Specified by:
resetin interfaceFailureDetectorRegistry<A>
-