Class WaiterTimeoutException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.eqixiac.equinix.core.waiter.WaiterException
com.eqixiac.equinix.core.waiter.WaiterTimeoutException
- All Implemented Interfaces:
Serializable
Thrown by
ResourceWaiter.await() when the success condition is not met before the
configured timeout elapses. Carries the last-observed resource for diagnostics.- Author:
- ianjones
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TgetLastObserved(Class<T> type) Typed convenience accessor for the last-observed resource, e.g.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
WaiterTimeoutException
-
-
Method Details
-
getLastObserved
- Returns:
- the most recently fetched resource (the state observed at timeout), or
null(alwaysnullafter serialization, as the payload is transient)
-
getLastObserved
Typed convenience accessor for the last-observed resource, e.g.ex.getLastObserved(Connection.class).- Type Parameters:
T- the expected resource type- Parameters:
type- the expected resource type- Returns:
- the last-observed resource cast to
type, ornullif absent - Throws:
ClassCastException- if the resource is not of the given type
-