|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Lifecycle
Cache resources may have non-trivial initialisation and disposal procedures. As such it is unrealistic to expect them to be avaiable for service after object creation.
This interface defines a lifecycle for these resources and associates aStatus
with each.
The Status of a newly created resource is Status.UNITIALISED.
| Method Summary | |
|---|---|
Status |
getStatus()
Returns the cache status. |
void |
start()
Notifies providers to start themselves. |
void |
stop()
Providers may be doing all sorts of exotic things and need to be able to clean up on stop. |
| Method Detail |
|---|
void start()
throws CacheException
getStatus() must return Status.STARTED.
CacheException
void stop()
throws CacheException
IllegalStateException will be thrown if an operation is performed on CacheManager or any contained Cache while
they are stopping or are a stopped.
Resources will change status to Status.STOPPING when this method is called. Once they are stopped they will change
status to Status.STOPPED.
CacheExceptionStatus getStatus()
Status
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||