public interface Guardian
Guardable
objects.| Modifier and Type | Interface | Description |
|---|---|---|
static interface |
Guardian.GuardContext |
A GuardContext represents the lifecycle status of a Guardable.
|
| Modifier and Type | Method | Description |
|---|---|---|
float |
getDefaultGuardRecovery() |
Default recovery percentage for Guardables monitored by this Guardian.
|
long |
getDefaultGuardTimeout() |
Default timeout interval (in milliseconds) for Guardables monitored by
this Guardian.
|
Guardian.GuardContext |
guard(Guardable guardable) |
Register the specified Guardable based on the Guardian's SLA parameters.
|
Guardian.GuardContext |
guard(Guardable guardable,
long cMillis,
float flPctRecover) |
Register the specified Guardable with the specified SLA parameters.
|
Guardian.GuardContext guard(Guardable guardable)
It's possible that the Guardian's defaults will prevent the Guardable from being registered. In such a case, this method returns null.
guardable - the Guardable to be monitored by this GuardianGuardian.GuardContext guard(Guardable guardable, long cMillis, float flPctRecover)
guardable - the Guardable to be guarded by this GuardiancMillis - the timeout for the specified GuardableflPctRecover - the percentage of the timeout after which to attempt
recovery of the Guardable; 0 < flPctRecover <=
1.0long getDefaultGuardTimeout()
float getDefaultGuardRecovery()