public abstract class RemoteHealthChecker extends Object implements HealthChecker<Object>
Modifier and Type | Field and Description |
---|---|
static long |
ENDPOINT_EXPIRY_MILLIS |
Constructor and Description |
---|
RemoteHealthChecker() |
Modifier and Type | Method and Description |
---|---|
static void |
clearCachedEndpointStatus()
Clear the cached endpoint statuses.
|
static VisitReport |
contactEndpoint(Activity<?> activity,
String endpoint)
Try to contact the specified endpoint as part of the health-checking of
the Activity.
|
static long |
getEndpointExpiryInMilliseconds() |
static int |
getTimeoutInSeconds() |
boolean |
isTimeConsuming()
A remote health-check is time consuming as it tries to contact an
external resource.
|
static void |
setEndpointExpiryInMilliseconds(int endpointExpiry) |
static void |
setTimeoutInSeconds(int timeout) |
public static final long ENDPOINT_EXPIRY_MILLIS
public static int getTimeoutInSeconds()
public static void setTimeoutInSeconds(int timeout)
public static long getEndpointExpiryInMilliseconds()
public static void setEndpointExpiryInMilliseconds(int endpointExpiry)
public static void clearCachedEndpointStatus()
RemoteHealthChecker
will only check an endpoint again if it has been more than
getEndpointExpiryInMilliseconds()
milliseconds since last check,
by default 30 seconds.public static VisitReport contactEndpoint(Activity<?> activity, String endpoint)
activity
- The activity that is being checkedendpoint
- The String corresponding to the URL of the endpointpublic boolean isTimeConsuming()
isTimeConsuming
in interface Visitor<Object>
Copyright © 2015–2016 The Apache Software Foundation. All rights reserved.