A Cacheable object has five states:
CacheManager, CacheFactory, Class#newInstance
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | |
| public Cacheable | Returns: an object reference if the object can take on the identity, null otherwise.The handle on the cacheable key, Object Creation details createParameter)Create a new item. |
| public Object | |
| public boolean | |
| public Cacheable | Returns: an object reference if the object can take on the identity, null otherwise.The handle on the cacheable key)Set the identity of the object. |
| clean | back to summary |
|---|---|
| public void clean(boolean forRemove) throws StandardException Clean the object.
It is up to the object to ensure synchronization of the isDirty()
and clean() method calls.
| |
| clearIdentity | back to summary |
|---|---|
| public void clearIdentity() Put the object into the No Identity state.
| |
| createIdentity | back to summary |
|---|---|
| public Cacheable createIdentity(Object key, Object createParameter) throws StandardException Create a new item.
Create a new item and set the identity of the object to represent it.
The object will be in the No Identity state,
ie. it will have just been created or clearIdentity() was just called.
| |
| getIdentity | back to summary |
|---|---|
| public Object getIdentity() Get the identity of this object.
| |
| isDirty | back to summary |
|---|---|
| public boolean isDirty() Returns true if the object is dirty.
May be called when the object is kept or unkept.
| |
| setIdentity | back to summary |
|---|---|
| public Cacheable setIdentity(Object key) throws StandardException Set the identity of the object.
Set the identity of the object to represent an item that already exists,
e.g. an existing container.
The object will be in the No Identity state,
ie. it will have just been created or clearIdentity() was just called.
| |