|
||||||||||
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 aStatus
with each.
The Status
of a newly created resource is Status.UNINITIALISED
.
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()
getStatus()
must return Status.STARTED
.
CacheException
- if ????? TODO describe whenvoid stop()
IllegalStateException
will be
Resources will change status to Status.STOPPED
when this method completes.
Stop must free any JVM resources used.
CacheException
- if ????? TODO describe when
IllegalStateException
- thrown if an operation is performed on a cache unless it is started.Status getStatus()
Status
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |