org.apache.jcs.auxiliary.remote.behavior
Interface IRemoteCacheAttributes

All Superinterfaces:
AuxiliaryCacheAttributes, java.lang.Cloneable, java.io.Serializable
All Known Implementing Classes:
RemoteCacheAttributes, RemoteHttpCacheAttributes

public interface IRemoteCacheAttributes
extends AuxiliaryCacheAttributes

This specifies what a remote cache configuration object should look like.


Field Summary
static int CLUSTER
          A remote cache is either a local cache or a cluster cache.
static boolean DEFAULT_RECEIVE
          If RECEIVE is false then the remote cache will not register a listener with the remote server.
static int DEFAULT_RMI_SOCKET_FACTORY_TIMEOUT_MILLIS
          The default timeout for the custom RMI socket facfory
static int DEFAULT_ZOMBIE_QUEUE_MAX_SIZE
          The number of elements the zombie queue will hold.
static int LOCAL
          A remote cache is either a local cache or a cluster cache.
 
Fields inherited from interface org.apache.jcs.auxiliary.AuxiliaryCacheAttributes
POOLED_QUEUE_TYPE, SINGLE_QUEUE_TYPE
 
Method Summary
 java.lang.String getClusterServers()
          Gets the clusterServers attribute of the IRemoteCacheAttributes object
 int getFailoverIndex()
          Gets the failoverIndex attribute of the IRemoteCacheAttributes object.
 java.lang.String[] getFailovers()
          Gets the failovers attribute of the IRemoteCacheAttributes object
 java.lang.String getFailoverServers()
          Gets the failoverServers attribute of the IRemoteCacheAttributes object
 boolean getGetOnly()
          Gets the getOnly attribute of the IRemoteCacheAttributes object
 int getGetTimeoutMillis()
          -1 and 0 mean no timeout, this is the default if the timeout is -1 or 0, no threadpool will be used.
 boolean getLocalClusterConsistency()
          Should cluster updates be propogated to the locals
 int getLocalPort()
          Gets the localPort attribute of the IRemoteCacheAttributes object
 java.lang.String getRemoteHost()
          Gets the remoteHost attribute of the IRemoteCacheAttributes object
 int getRemotePort()
          Gets the remotePort attribute of the IRemoteCacheAttributes object
 java.lang.String getRemoteServiceName()
          Gets the remoteServiceName attribute of the IRemoteCacheAttributes object
 int getRemoteType()
          Gets the remoteType attribute of the IRemoteCacheAttributes object
 java.lang.String getRemoteTypeName()
          Gets the remoteTypeName attribute of the IRemoteCacheAttributes object
 boolean getRemoveUponRemotePut()
          Gets the removeUponRemotePut attribute of the IRemoteCacheAttributes object
 int getRmiSocketFactoryTimeoutMillis()
          This sets a general timeout on the rmi socket factory.
 java.lang.String getThreadPoolName()
          The thread pool the remote cache should use.
 int getZombieQueueMaxSize()
          The number of elements the zombie queue will hold.
 boolean isReceive()
          If RECEIVE is false then the remote cache will not register a listener with the remote server.
 void setClusterServers(java.lang.String s)
          Sets the clusterServers attribute of the IRemoteCacheAttributes object
 void setFailoverIndex(int p)
          Sets the failoverIndex attribute of the IRemoteCacheAttributes object
 void setFailovers(java.lang.String[] f)
          Sets the failovers attribute of the IRemoteCacheAttributes object
 void setFailoverServers(java.lang.String s)
          Sets the failoverServers attribute of the IRemoteCacheAttributes object
 void setGetOnly(boolean r)
          Sets the getOnly attribute of the IRemoteCacheAttributes object
 void setGetTimeoutMillis(int millis)
          -1 means no timeout, this is the default if the timeout is -1 or 0, no threadpool will be used.
 void setLocalClusterConsistency(boolean r)
          Should cluster updates be propogated to the locals
 void setLocalPort(int p)
          Sets the localPort attribute of the IRemoteCacheAttributes object
 void setReceive(boolean receive)
          By default this option is true.
 void setRemoteHost(java.lang.String s)
          Sets the remoteHost attribute of the IRemoteCacheAttributes object
 void setRemotePort(int p)
          Sets the remotePort attribute of the IRemoteCacheAttributes object
 void setRemoteServiceName(java.lang.String s)
          Sets the remoteServiceName attribute of the IRemoteCacheAttributes object
 void setRemoteType(int p)
          Sets the remoteType attribute of the IRemoteCacheAttributes object
 void setRemoteTypeName(java.lang.String s)
          Sets the remoteTypeName attribute of the IRemoteCacheAttributes object
 void setRemoveUponRemotePut(boolean r)
          Sets the removeUponRemotePut attribute of the IRemoteCacheAttributes object
 void setRmiSocketFactoryTimeoutMillis(int rmiSocketFactoryTimeoutMillis)
          This sets a general timeout on the RMI socket factory.
 void setThreadPoolName(java.lang.String name)
          Set the anme of the pool to use.
 void setZombieQueueMaxSize(int zombieQueueMaxSize)
          The number of elements the zombie queue will hold.
 
Methods inherited from interface org.apache.jcs.auxiliary.AuxiliaryCacheAttributes
copy, getCacheName, getEventQueuePoolName, getEventQueueType, getName, setCacheName, setEventQueuePoolName, setEventQueueType, setName
 

Field Detail

LOCAL

static final int LOCAL
A remote cache is either a local cache or a cluster cache.

See Also:
Constant Field Values

CLUSTER

static final int CLUSTER
A remote cache is either a local cache or a cluster cache.

See Also:
Constant Field Values

DEFAULT_RMI_SOCKET_FACTORY_TIMEOUT_MILLIS

static final int DEFAULT_RMI_SOCKET_FACTORY_TIMEOUT_MILLIS
The default timeout for the custom RMI socket facfory

See Also:
Constant Field Values

DEFAULT_RECEIVE

static final boolean DEFAULT_RECEIVE
If RECEIVE is false then the remote cache will not register a listener with the remote server. This allows you to configure a remote server as a repository from which you can get and to which you put, but from which you do not reveive any notifications. That is, you will not receive updates or removes.

If you set this option to false, you should set your locl memory size to 0.

See Also:
Constant Field Values

DEFAULT_ZOMBIE_QUEUE_MAX_SIZE

static final int DEFAULT_ZOMBIE_QUEUE_MAX_SIZE
The number of elements the zombie queue will hold. This queue is used to store events if we loose our conenction with the server.

See Also:
Constant Field Values
Method Detail

getRemoteTypeName

java.lang.String getRemoteTypeName()
Gets the remoteTypeName attribute of the IRemoteCacheAttributes object

Returns:
The remoteTypeName value

setRemoteTypeName

void setRemoteTypeName(java.lang.String s)
Sets the remoteTypeName attribute of the IRemoteCacheAttributes object

Parameters:
s - The new remoteTypeName value

getRemoteType

int getRemoteType()
Gets the remoteType attribute of the IRemoteCacheAttributes object

Returns:
The remoteType value

setRemoteType

void setRemoteType(int p)
Sets the remoteType attribute of the IRemoteCacheAttributes object

Parameters:
p - The new remoteType value

getFailoverIndex

int getFailoverIndex()
Gets the failoverIndex attribute of the IRemoteCacheAttributes object.

This specifies which server in the list we are listening to if the number is greater than 0 we will try to move to 0 position the primary is added as position 1 if it is present

Returns:
The failoverIndex value

setFailoverIndex

void setFailoverIndex(int p)
Sets the failoverIndex attribute of the IRemoteCacheAttributes object

Parameters:
p - The new failoverIndex value

getFailovers

java.lang.String[] getFailovers()
Gets the failovers attribute of the IRemoteCacheAttributes object

Returns:
The failovers value

setFailovers

void setFailovers(java.lang.String[] f)
Sets the failovers attribute of the IRemoteCacheAttributes object

Parameters:
f - The new failovers value

getRemoteServiceName

java.lang.String getRemoteServiceName()
Gets the remoteServiceName attribute of the IRemoteCacheAttributes object

Returns:
The remoteServiceName value

setRemoteServiceName

void setRemoteServiceName(java.lang.String s)
Sets the remoteServiceName attribute of the IRemoteCacheAttributes object

Parameters:
s - The new remoteServiceName value

getRemoteHost

java.lang.String getRemoteHost()
Gets the remoteHost attribute of the IRemoteCacheAttributes object

Returns:
The remoteHost value

setRemoteHost

void setRemoteHost(java.lang.String s)
Sets the remoteHost attribute of the IRemoteCacheAttributes object

Parameters:
s - The new remoteHost value

getRemotePort

int getRemotePort()
Gets the remotePort attribute of the IRemoteCacheAttributes object

Returns:
The remotePort value

setRemotePort

void setRemotePort(int p)
Sets the remotePort attribute of the IRemoteCacheAttributes object

Parameters:
p - The new remotePort value

getLocalPort

int getLocalPort()
Gets the localPort attribute of the IRemoteCacheAttributes object

Returns:
The localPort value

setLocalPort

void setLocalPort(int p)
Sets the localPort attribute of the IRemoteCacheAttributes object

Parameters:
p - The new localPort value

getClusterServers

java.lang.String getClusterServers()
Gets the clusterServers attribute of the IRemoteCacheAttributes object

Returns:
The clusterServers value

setClusterServers

void setClusterServers(java.lang.String s)
Sets the clusterServers attribute of the IRemoteCacheAttributes object

Parameters:
s - The new clusterServers value

getFailoverServers

java.lang.String getFailoverServers()
Gets the failoverServers attribute of the IRemoteCacheAttributes object

Returns:
The failoverServers value

setFailoverServers

void setFailoverServers(java.lang.String s)
Sets the failoverServers attribute of the IRemoteCacheAttributes object

Parameters:
s - The new failoverServers value

getRemoveUponRemotePut

boolean getRemoveUponRemotePut()
Gets the removeUponRemotePut attribute of the IRemoteCacheAttributes object

Returns:
The removeUponRemotePut value

setRemoveUponRemotePut

void setRemoveUponRemotePut(boolean r)
Sets the removeUponRemotePut attribute of the IRemoteCacheAttributes object

Parameters:
r - The new removeUponRemotePut value

getGetOnly

boolean getGetOnly()
Gets the getOnly attribute of the IRemoteCacheAttributes object

Returns:
The getOnly value

setGetOnly

void setGetOnly(boolean r)
Sets the getOnly attribute of the IRemoteCacheAttributes object

Parameters:
r - The new getOnly value

getLocalClusterConsistency

boolean getLocalClusterConsistency()
Should cluster updates be propogated to the locals

Returns:
The localClusterConsistency value

setLocalClusterConsistency

void setLocalClusterConsistency(boolean r)
Should cluster updates be propogated to the locals

Parameters:
r - The new localClusterConsistency value

getThreadPoolName

java.lang.String getThreadPoolName()
The thread pool the remote cache should use. At first this will only be for gets.

The default name is "remote_cache_client"

Returns:
the name of the pool

setThreadPoolName

void setThreadPoolName(java.lang.String name)
Set the anme of the pool to use. Pools should be defined in the cache.ccf.

Parameters:
name -

getGetTimeoutMillis

int getGetTimeoutMillis()
-1 and 0 mean no timeout, this is the default if the timeout is -1 or 0, no threadpool will be used.

Returns:
the time in millis

setGetTimeoutMillis

void setGetTimeoutMillis(int millis)
-1 means no timeout, this is the default if the timeout is -1 or 0, no threadpool will be used. If the timeout is greater than 0 a threadpool will be used for get requests.

Parameters:
millis -

getRmiSocketFactoryTimeoutMillis

int getRmiSocketFactoryTimeoutMillis()
This sets a general timeout on the rmi socket factory. By default the socket factory will block forever.

We have a default setting. The default rmi behavior should never be used.

Returns:
int milliseconds

setRmiSocketFactoryTimeoutMillis

void setRmiSocketFactoryTimeoutMillis(int rmiSocketFactoryTimeoutMillis)
This sets a general timeout on the RMI socket factory. By default the socket factory will block forever.

Parameters:
rmiSocketFactoryTimeoutMillis -

setReceive

void setReceive(boolean receive)
By default this option is true. If you set it to false, you will not receive updates or removes from the remote server.

Parameters:
receive -

isReceive

boolean isReceive()
If RECEIVE is false then the remote cache will not register a listener with the remote server. This allows you to configure a remote server as a repository from which you can get and to which you put, but from which you do not reveive any notifications. That is, you will not receive updates or removes.

If you set this option to false, you should set your locl memory size to 0.

The remote cache manager uses this value to decide whether or not to register a listener.

It makes no sense to configure a cluster remote cache to no receive.

Since a non-receiving remote cache client will not register a listener, it will not have a listener id assigned from the server. As such the remote server cannot determine if it is a cluster or a normal client. It will assume that it is a normal client.

Returns:
the receive value.

setZombieQueueMaxSize

void setZombieQueueMaxSize(int zombieQueueMaxSize)
The number of elements the zombie queue will hold. This queue is used to store events if we loose our connection with the server.

Parameters:
zombieQueueMaxSize - The zombieQueueMaxSize to set.

getZombieQueueMaxSize

int getZombieQueueMaxSize()
The number of elements the zombie queue will hold. This queue is used to store events if we loose our connection with the server.

Returns:
Returns the zombieQueueMaxSize.


Copyright © 2002-2009 Apache Software Foundation. All Rights Reserved.