com.caucho.server.cluster
Class AbstractClusterStoreManager

java.lang.Object
  extended by com.caucho.server.cluster.StoreManager
      extended by com.caucho.server.cluster.AbstractClusterStoreManager
All Implemented Interfaces:
ClassLoaderListener, EnvironmentListener, AlarmListener, java.util.EventListener
Direct Known Subclasses:
ClusterStoreManager, JdbcStoreManager

public abstract class AbstractClusterStoreManager
extends StoreManager

Base class for distributed stores.


Field Summary
 
Fields inherited from class com.caucho.server.cluster.StoreManager
_clusterObjects, _idleCheckInterval, _isAlwaysLoad, _isAlwaysSave, _loadCount, _loadFailCount, _maxIdleTime, _saveCount, _saveFailCount, _selfIndex, _storeMap
 
Constructor Summary
AbstractClusterStoreManager()
           
 
Method Summary
 int getPrimaryIndex(java.lang.String id, int offset)
          Returns the owner index for the id.
 ClusterServer getPrimaryServer(java.lang.String id, int offset)
          Returns the primary server for the id.
 int getSecondaryIndex(java.lang.String id, int offset)
          Returns the secondary index for the id.
 ClusterServer getSecondaryServer(java.lang.String id, int offset)
          Returns the secondary server for the id.
 int getTertiaryIndex(java.lang.String id, int offset)
          Returns the tertiary index for the id.
 ClusterServer getTertiaryServer(java.lang.String id, int offset)
          Returns the tertiary server for the id.
protected  void ping(ServerPool server)
          Updates the cached object value on the target server.
 void updateOwner(ClusterObject obj)
          Updates the owner object.
 
Methods inherited from class com.caucho.server.cluster.StoreManager
access, access, accessImpl, accessImpl, classLoaderDestroy, classLoaderInit, clearOldObjects, create, createStore, destroy, environmentBind, environmentConfigure, environmentStart, environmentStop, getAccessWindowTime, getAdmin, getCluster, getIdleCheckTime, getLoadCount, getLoadFailCount, getMaxIdleTime, getObjectCount, getOwningServer, getSaveCount, getSaveFailCount, getSelfIndex, getServerList, getStore, handleAlarm, init, invalidate, isAlwaysLoad, isAlwaysSave, isPrimary, load, remove, remove, removeStore, setAlwaysLoad, setAlwaysSave, setCluster, setExpireInterval, setMaxIdleTime, start, startUpdate, store, toString, updateIdleCheckInterval
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractClusterStoreManager

public AbstractClusterStoreManager()
Method Detail

updateOwner

public void updateOwner(ClusterObject obj)
                 throws java.lang.Exception
Updates the owner object.

Overrides:
updateOwner in class StoreManager
Parameters:
uniqueId - the identifier of the storage group
Throws:
java.lang.Exception

getPrimaryIndex

public int getPrimaryIndex(java.lang.String id,
                           int offset)
Returns the owner index for the id.

Overrides:
getPrimaryIndex in class StoreManager

getPrimaryServer

public ClusterServer getPrimaryServer(java.lang.String id,
                                      int offset)
Returns the primary server for the id.


getSecondaryIndex

public int getSecondaryIndex(java.lang.String id,
                             int offset)
Returns the secondary index for the id.

Overrides:
getSecondaryIndex in class StoreManager

getSecondaryServer

public ClusterServer getSecondaryServer(java.lang.String id,
                                        int offset)
Returns the secondary server for the id.


getTertiaryIndex

public int getTertiaryIndex(java.lang.String id,
                            int offset)
Returns the tertiary index for the id.

Overrides:
getTertiaryIndex in class StoreManager

getTertiaryServer

public ClusterServer getTertiaryServer(java.lang.String id,
                                       int offset)
Returns the tertiary server for the id.


ping

protected void ping(ServerPool server)
Updates the cached object value on the target server.