|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CacheLifecycle
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 aCacheStatus
with each.
The CacheStatus of a newly created resource is CacheStatus.UNINITIALISED.
| Method Summary | |
|---|---|
CacheStatus |
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 CacheStatus.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 CacheStatus.STOPPING when this method is called. Once they are stopped they will change
status to CacheStatus.STOPPED.
CacheExceptionCacheStatus getStatus()
CacheStatus
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||