|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.solarmetric.kodo.runtime.datacache.AbstractCacheImpl
|
+--com.solarmetric.kodo.runtime.datacache.plugins.CacheImpl
A PersistenceManagerFactory cache implementation. Batch updates are performed atomically.
| Fields inherited from class com.solarmetric.kodo.runtime.datacache.AbstractCacheImpl |
cache, s_log |
| Constructor Summary | |
CacheImpl()
|
|
| Method Summary | |
protected boolean |
addExistingUpdates()
Do nothing with the existing updates. |
void |
close()
Close any resources used by this listener. |
void |
endConfiguration()
Invoked upon completion of configuration of this object |
CacheMap |
getCacheMap()
Deprecated. Use AbstractCacheImpl.getMap() instead. |
int |
getCacheSize()
Returns the maximum number of unpinned objects to keep hard references to. |
boolean |
getKeepSoftReferences()
Returns whether or not this cache will keep soft references when objects expire. |
int |
getSoftReferenceSize()
Returns the maximum number of unpinned objects to keep soft references to. |
protected Map |
newMap()
Returns a new CacheMap for use as the underlying data
cache. |
boolean |
pin(Object key)
Pin the value stored under key into the cache. |
void |
setCacheSize(int size)
Sets the maximum number of unpinned objects to keep hard references to. |
void |
setKeepSoftReferences(boolean refs)
Configures whether or not this cache will keep soft references when objects expire. |
void |
setSoftReferenceSize(int size)
Sets the maximum number of unpinned objects to keep soft references to. |
void |
startConfiguration()
Invoked before configuration is begun on this object |
void |
transactionCommitted(Set added,
Set updated,
Set deleted)
Notification that a transaction associated with a different PersistenceManagerFactory has successfully committed. |
boolean |
unpin(Object key)
Unpin the value stored under key into the cache. |
| Methods inherited from class com.solarmetric.kodo.runtime.datacache.AbstractCacheImpl |
addExpirationListener, batchUpdate, clear, containsKey, get, getCacheStatisticsString, getHitCount, getMap, getMissCount, getName, getRecordCacheStatistics, isDecorator, keyExpired, put, remove, removeAll, removeDecorator, removeDecorators, removeExpirationListener, setName, setRecordCacheStatistics, toString, updateValue |
| Methods inherited from class java.lang.Object |
|
| Constructor Detail |
public CacheImpl()
| Method Detail |
public CacheMap getCacheMap()
AbstractCacheImpl.getMap() instead.
Returns the underlying CacheMap that this
CacheImpl is using. This is not an unmodifiable
view on the map, so care should be taken with this
reference. Implementations should probably not mess with the
contents of the cache, but should only use this reference to
obtain cache metrics.
public void setCacheSize(int size)
size, then this method will result in the cache
flushing old values.public int getCacheSize()
public void setSoftReferenceSize(int size)
size, then this method will result in the cache
flushing values.public int getSoftReferenceSize()
-1.public void setKeepSoftReferences(boolean refs)
true.public boolean getKeepSoftReferences()
protected Map newMap()
CacheMap for use as the underlying data
cache. This implementation returns a CacheMap. To
implement a more sophisticated caching strategy, override this
method to return a subclass of CacheMap.newMap in class AbstractCacheImplprotected boolean addExistingUpdates()
addExistingUpdates in class AbstractCacheImplpublic boolean pin(Object key)
DataCachekey into the cache.
This method guarantees that key's value will not
be dropped by the caching algorithm. This method does not
affect the behavior of DataCache.remove(java.lang.Object).com.solarmetric.kodo.runtime.datacache.DataCachetrue if key's value was
pinned into the cache; false if the
key is not in the cache.public boolean unpin(Object key)
DataCachekey into the cache.
This method reverses a previous invocation of DataCache.pin(java.lang.Object).
This method does not remove anything from the cache; it merely
makes key's value a candidate for flushing from
the cache.com.solarmetric.kodo.runtime.datacache.DataCachetrue if key's value was
unpinned from the cache; false if the
key is not in the cache.public void close()
RemoteCommitListenerclose in interface RemoteCommitListenerclose in class AbstractCacheImplpublic void startConfiguration()
ConfigurablestartConfiguration in class AbstractCacheImplpublic void endConfiguration()
ConfigurableendConfiguration in class AbstractCacheImpl
public void transactionCommitted(Set added,
Set updated,
Set deleted)
RemoteCommitListenerNotification that a transaction associated with a different
PersistenceManagerFactory has successfully
committed. added, updated, and
deleted are sets of object IDs that were added,
updated, or deleted, respectively.
transactionCommitted in interface RemoteCommitListener
|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||