SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

com.solarmetric.rd.kodo.runtime.datacache.plugins
Class DistributedCache

java.lang.Object
  |
  +--com.solarmetric.rd.kodo.runtime.datacache.plugins.LocalCache
        |
        +--com.solarmetric.rd.kodo.runtime.datacache.plugins.DistributedCache
All Implemented Interfaces:
Configurable, DataCache
Direct Known Subclasses:
JMSCache, SocketDistributedCache

public abstract class DistributedCache
extends LocalCache

A base class for distributed caches.


Field Summary
 
Fields inherited from class com.solarmetric.rd.kodo.runtime.datacache.plugins.LocalCache
cache
 
Constructor Summary
DistributedCache()
           
 
Method Summary
 void batchUpdate(java.util.Map additions, java.util.Map updates, java.util.Collection deletes, java.lang.Object origin)
          Overridden batchUpdate() method that invokes broadcastUpdate() after updating the cache.
protected abstract  void broadcastUpdate(java.util.Map additions, java.util.Map updates, java.util.Collection deletes)
          Notifys other PersistenceManagerFactory caches in this JVM and on other machines of changes to the cache.
protected  void log(java.lang.String s)
          Log the message to the logging framework.
protected  void log(java.lang.String s, java.lang.Throwable t)
          Log the message to the logging framework.
protected  void receivedBatchUpdate(java.util.Collection additions, java.util.Collection updates, java.util.Collection deletes)
          Invoked when a notification of update has been received from a different cache, and that this cache should therefore be updated as appropriate.
 
Methods inherited from class com.solarmetric.rd.kodo.runtime.datacache.plugins.LocalCache
clear, close, endConfiguration, get, getCacheMap, getCacheSize, newCacheMap, pin, put, remove, removeAll, setCacheSize, startConfiguration, unpin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistributedCache

public DistributedCache()
Method Detail

batchUpdate

public void batchUpdate(java.util.Map additions,
                        java.util.Map updates,
                        java.util.Collection deletes,
                        java.lang.Object origin)
Overridden batchUpdate() method that invokes broadcastUpdate() after updating the cache.

Specified by:
batchUpdate in interface DataCache
Overrides:
batchUpdate in class LocalCache
Parameters:
origin - the object that initiated this cache update. This can be useful for implementations in which many sources share a single cache, which in turn communicates back to the sources on cache updates.

receivedBatchUpdate

protected void receivedBatchUpdate(java.util.Collection additions,
                                   java.util.Collection updates,
                                   java.util.Collection deletes)
Invoked when a notification of update has been received from a different cache, and that this cache should therefore be updated as appropriate. This implementation drops all the keys listed in additions, updates, and deletes.


broadcastUpdate

protected abstract void broadcastUpdate(java.util.Map additions,
                                        java.util.Map updates,
                                        java.util.Collection deletes)
Notifys other PersistenceManagerFactory caches in this JVM and on other machines of changes to the cache.


log

protected void log(java.lang.String s)
Log the message to the logging framework.


log

protected void log(java.lang.String s,
                   java.lang.Throwable t)
Log the message to the logging framework.


SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

Copyright 2001,2002,2003 SolarMetric, Inc. All Rights Reserved.