|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.impl.sql.catalog.SPSNameCacheable
This class implements a Cacheable for a DataDictionary cache of sps descriptors, with the lookup key being the name/schema of the sps. Assumes client passes in a string that includes the schema name.
The cache ensures that the class of the target sps is loaded if the sps is found in cache. This is ensured by calling loadGeneratedClass() on the sps when it is added to the cache. Each subsequent user of the sps cache will do its own load/unload on the class. Because the class manager/loader maintains reference counts on the classes it is handling, the user load/unload will just increment/decrement the use count. Only when the sps is uncached will it be unloaded.
Field Summary | |
private DataDictionaryImpl |
dd
|
private TableKey |
identity
|
private SPSDescriptor |
spsd
|
Constructor Summary | |
(package private) |
SPSNameCacheable(DataDictionaryImpl dd)
|
Method Summary | |
private boolean |
checkConsistency(SPSDescriptor uncachedSpsd,
java.lang.Object identity,
HeaderPrintWriter reportInconsistent)
Check the consistency of the table descriptor held by this TDCacheable versus an uncached table descriptor. |
void |
clean(boolean forRemove)
Clean the object. |
void |
clearIdentity()
Put the object into the No Identity state. |
Cacheable |
createIdentity(java.lang.Object key,
java.lang.Object createParameter)
Create a new item and set the identity of the object to represent it. |
java.lang.Object |
getIdentity()
Get the identity of this object. |
SPSDescriptor |
getSPSDescriptor()
Get the sps descriptor that is associated with this Cacheable |
boolean |
isDirty()
Returns true of the object is dirty. |
Cacheable |
setIdentity(java.lang.Object key)
Set the identity of the object to represent an item that already exists, e.g. an existing container. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private TableKey identity
private SPSDescriptor spsd
private final DataDictionaryImpl dd
Constructor Detail |
SPSNameCacheable(DataDictionaryImpl dd)
Method Detail |
public void clearIdentity()
Cacheable
clearIdentity
in interface Cacheable
Cacheable.clearIdentity()
public java.lang.Object getIdentity()
Cacheable
getIdentity
in interface Cacheable
Cacheable.getIdentity()
public Cacheable createIdentity(java.lang.Object key, java.lang.Object createParameter)
Cacheable
createIdentity
in interface Cacheable
Cacheable.createIdentity(java.lang.Object, java.lang.Object)
public Cacheable setIdentity(java.lang.Object key) throws StandardException
Cacheable
setIdentity
in interface Cacheable
StandardException
- Thrown on errorCacheable.setIdentity(java.lang.Object)
public void clean(boolean forRemove)
Cacheable
clean
in interface Cacheable
Cacheable.clean(boolean)
public boolean isDirty()
Cacheable
isDirty
in interface Cacheable
Cacheable.isDirty()
public SPSDescriptor getSPSDescriptor()
private boolean checkConsistency(SPSDescriptor uncachedSpsd, java.lang.Object identity, HeaderPrintWriter reportInconsistent) throws StandardException
uncachedSpsd
- The uncached descriptor to compare toidentity
- The identity of the table descriptorreportInconsistent
- A HeaderPrintWriter to send complaints to
StandardException
- Thrown on error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |