wt.cache
Class RemoteCacheServer

java.lang.Object
  extended bywt.cache.RemoteCacheServer

public class RemoteCacheServer
extends Object

Class that provides access to a remote cache server. Instances of this class are local (non-remote) objects that encapsulate the communication with a remote cache server object. This encapsulation includes object location, and automatic recovery from communication errors.

The local object represents the "concept" of a remote cache server, not a particular instance of the remote server that is bound to the local object. This allows the local object to manage connecting to a server object, and reconnecting to new server objects during error recovery.

This class is only used for communication from a slave cache to its master cache. The communication from a master to its registered slaves is handled in the CacheManager class because that communication does not share the same error recovery and server location policies.


Field Summary
private  CacheServer currentCacheServer
           
private static Object getProfilingKey
           
static boolean isGetProfEnabled
           
static boolean isPutProfEnabled
           
static boolean isRemoveProfEnabled
           
static boolean isUpdateProfEnabled
           
private  CacheManager localCacheManager
           
private static int MARSHAL_RETRY
           
private static int OTHER_RETRY
           
private static Object putProfilingKey
           
private static Object removeProfilingKey
           
private static String RESOURCE
           
private  RemoteServerManager serverManager
           
private  String serverName
           
private static Object updateProfilingKey
           
private static boolean VERBOSE_CLIENT
           
 
Constructor Summary
RemoteCacheServer(String server_name, RemoteServerManager server_manager)
           
 
Method Summary
protected  CacheServer getCacheServer(CacheServer prev_cache_server)
           
 Object getEntry(Object key)
           
private static void printRemoteException(RemoteException e)
           
 void putEntry(Object key, Object value)
           
private static void registerProfOperations()
           
 int registerSlave(CacheManager slave)
           
 void removeEntry(Object cache_key)
           
private  void repProfGetEntry(Object key, Object value)
           
private  void repProfPutEntry(Object key)
           
private  void repProfRemoveEntry(Object key)
           
private  void repProfUpdateEntry(Object key)
           
 void updateEntry(Object cache_key, Object update_key, Object update_value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

MARSHAL_RETRY

private static final int MARSHAL_RETRY

OTHER_RETRY

private static final int OTHER_RETRY

VERBOSE_CLIENT

private static final boolean VERBOSE_CLIENT

serverName

private String serverName

serverManager

private RemoteServerManager serverManager

currentCacheServer

private CacheServer currentCacheServer

localCacheManager

private CacheManager localCacheManager

isGetProfEnabled

public static boolean isGetProfEnabled

isPutProfEnabled

public static boolean isPutProfEnabled

isRemoveProfEnabled

public static boolean isRemoveProfEnabled

isUpdateProfEnabled

public static boolean isUpdateProfEnabled

getProfilingKey

private static Object getProfilingKey

putProfilingKey

private static Object putProfilingKey

removeProfilingKey

private static Object removeProfilingKey

updateProfilingKey

private static Object updateProfilingKey
Constructor Detail

RemoteCacheServer

public RemoteCacheServer(String server_name,
                         RemoteServerManager server_manager)
Method Detail

registerSlave

public int registerSlave(CacheManager slave)
                  throws RemoteException
Throws:
RemoteException

getEntry

public Object getEntry(Object key)
                throws RemoteException
Throws:
RemoteException

putEntry

public void putEntry(Object key,
                     Object value)
              throws RemoteException
Throws:
RemoteException

updateEntry

public void updateEntry(Object cache_key,
                        Object update_key,
                        Object update_value)
                 throws RemoteException
Throws:
RemoteException

removeEntry

public void removeEntry(Object cache_key)
                 throws RemoteException
Throws:
RemoteException

printRemoteException

private static void printRemoteException(RemoteException e)

getCacheServer

protected CacheServer getCacheServer(CacheServer prev_cache_server)
                              throws RemoteException
Throws:
RemoteException

registerProfOperations

private static void registerProfOperations()

repProfGetEntry

private void repProfGetEntry(Object key,
                             Object value)

repProfPutEntry

private void repProfPutEntry(Object key)

repProfRemoveEntry

private void repProfRemoveEntry(Object key)

repProfUpdateEntry

private void repProfUpdateEntry(Object key)