T - The type to be returned (normally the subclass' type)public abstract class SlowLoadableComponent<T extends LoadableComponent<T>> extends LoadableComponent<T>
LoadableComponent which might not have finished loading when load() returns. After a
call to load(), the isLoaded() method should continue to fail until the component has fully
loaded.
new SlowHypotheticalComponent().get();
| Constructor and Description |
|---|
SlowLoadableComponent(Clock clock,
int timeOutInSeconds) |
| Modifier and Type | Method and Description |
|---|---|
T |
get()
Ensure that the component is currently loaded.
|
protected void |
isError()
Check for well known error cases, which would mean that loading has finished, but an error
condition was seen.
|
protected long |
sleepFor() |
isLoaded, loadpublic SlowLoadableComponent(Clock clock, int timeOutInSeconds)
public T get()
LoadableComponentget in class LoadableComponent<T extends LoadableComponent<T>>protected void isError()
throws Error
Error - When a well-known error condition has caused the load to failprotected long sleepFor()
Copyright © 2015. All rights reserved.