| java.lang.Object org.apache.derby.impl.store.access.CacheableConglomerate
CacheableConglomerate | class CacheableConglomerate implements Cacheable(Code) | | The CacheableConglomerate implements a single item in the cache used by
the Conglomerate directory to cache Conglomerates. It is simply a wrapper
object for the conglomid and Conglomerate object that is read from the
Conglomerate Conglomerate. It is a wrapper rather than extending
the conglomerate implementations because we want to cache all conglomerate
implementatations: (ie. Heap, B2I, ...).
References to the Conglomerate objects cached by this wrapper will be handed
out to callers. When this this object goes out of cache callers may still
have references to the Conglomerate objects, which we are counting on java
to garbage collect. The Conglomerate Objects never change after they are
created.
|
CacheableConglomerate | CacheableConglomerate()(Code) | | |
clean | public void clean(boolean forRemove) throws StandardException(Code) | | Clean the object.
It is up to the object to ensure synchronization of the isDirty()
and clean() method calls.
If forRemove is true then the
object is being removed due to an explict remove request, in this case
the cache manager will have called this method regardless of the
state of the isDirty()
If an exception is thrown the object must be left in the clean state.
MT - thread safe - Can be called at any time by the cache manager, it is the
responsibility of the object implementing Cacheable to ensure any users of the
object do not conflict with the clean call.
exception: StandardException - Standard Cloudscape error policy. |
clearIdentity | public void clearIdentity()(Code) | | Put the object into the No Identity state.
MT - single thread required - Method must only be called be cache manager
and the cache manager will guarantee only one thread can be calling it.
|
createIdentity | public Cacheable createIdentity(Object key, Object createParameter) throws StandardException(Code) | | 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.
The object must copy the information out of key, not just store a
reference to key. After this call the expression
getIdentity().equals(key) must return true.
If the class of the object needs to change (e.g. to support a different
format) then the object should create a new object, call its
initParameter() with the parameters the original object was called with,
set its identity and return a reference to it. The cache manager will
discard the reference to the old object.
If an exception is thrown the object must be left in the no-identity
state.
MT - single thread required - Method must only be called be cache
manager and the cache manager will guarantee only one thread can be
calling it.
an object reference if the object can take on the identity, null otherwise. exception: StandardException - If forCreate is true and the object cannot be created. See Also: CacheManager.create |
getIdentity | public Object getIdentity()(Code) | | Get the identity of this object.
MT - thread safe.
|
isDirty | public boolean isDirty()(Code) | | Returns true of the object is dirty. Will only be called when the object is unkept.
MT - thread safe
|
setIdentity | public Cacheable setIdentity(Object key) throws StandardException(Code) | | 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.
The object must copy the information out of key, not just store a reference to key.
After this call the expression getIdentity().equals(key) must return true.
If the class of the object needs to change (e.g. to support a different format)
then the object should create a new object, call its initParameter() with the parameters
the original object was called with, set its identity and return a reference to it. The cache
manager will discard the reference to the old object.
If an exception is thrown the object must be left in the no-identity state.
MT - single thread required - Method must only be called be cache manager
and the cache manager will guarantee only one thread can be calling it.
an object reference if the object can take on the identity, null otherwise. exception: StandardException - Standard Cloudscape Policy See Also: CacheManager.find |
|
|