public class DefaultFailureDetectorRegistry<A> extends java.lang.Object implements FailureDetectorRegistry<A>
FailureDetectorRegistry
.
param: detectorFactory By-name parameter that returns the failure detector instance to be used by a newly registered resource
Constructor and Description |
---|
DefaultFailureDetectorRegistry(scala.Function0<FailureDetector> detectorFactory) |
Modifier and Type | Method and Description |
---|---|
scala.Option<FailureDetector> |
failureDetector(A resource)
INTERNAL API
Get the underlying FailureDetector for a resource.
|
void |
heartbeat(A resource)
Records a heartbeat for a resource.
|
boolean |
isAvailable(A resource)
Returns true if the resource is considered to be up and healthy and returns false otherwise.
|
boolean |
isMonitoring(A resource)
Returns true if the failure detector has received any heartbeats and started monitoring
of the resource.
|
void |
remove(A resource)
Removes the heartbeat management for a resource.
|
void |
reset()
Removes all resources and any associated failure detector state.
|
public DefaultFailureDetectorRegistry(scala.Function0<FailureDetector> detectorFactory)
public final boolean isAvailable(A resource)
FailureDetectorRegistry
isAvailable
in interface FailureDetectorRegistry<A>
resource
- (undocumented)public final boolean isMonitoring(A resource)
FailureDetectorRegistry
isMonitoring
in interface FailureDetectorRegistry<A>
resource
- (undocumented)public final void heartbeat(A resource)
FailureDetectorRegistry
heartbeat
in interface FailureDetectorRegistry<A>
resource
- (undocumented)public final void remove(A resource)
FailureDetectorRegistry
remove
in interface FailureDetectorRegistry<A>
resource
- (undocumented)public final void reset()
FailureDetectorRegistry
reset
in interface FailureDetectorRegistry<A>
public scala.Option<FailureDetector> failureDetector(A resource)
resource
- (undocumented)