Class RemoteCacheAttributes
java.lang.Object
org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCacheAttributes
org.apache.commons.jcs3.auxiliary.remote.CommonRemoteCacheAttributes
org.apache.commons.jcs3.auxiliary.remote.RemoteCacheAttributes
- All Implemented Interfaces:
Serializable
,Cloneable
,AuxiliaryCacheAttributes
,ICommonRemoteCacheAttributes
,IRemoteCacheAttributes
- Direct Known Subclasses:
RemoteHttpCacheAttributes
public class RemoteCacheAttributes
extends CommonRemoteCacheAttributes
implements IRemoteCacheAttributes
These objects are used to configure the remote cache client.
- See Also:
-
Field Summary
Fields inherited from interface org.apache.commons.jcs3.auxiliary.remote.behavior.ICommonRemoteCacheAttributes
DEFAULT_RMI_SOCKET_FACTORY_TIMEOUT_MILLIS
Fields inherited from interface org.apache.commons.jcs3.auxiliary.remote.behavior.IRemoteCacheAttributes
DEFAULT_RECEIVE, DEFAULT_ZOMBIE_QUEUE_MAX_SIZE
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for the RemoteCacheAttributes object -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the failoverIndex attribute of the RemoteCacheAttributes object.Gets the failovers attribute of the RemoteCacheAttributes object.Gets the failoverServers attribute of the RemoteCacheAttributes object.int
-1 and 0 mean no timeout, this is the default if the timeout is -1 or 0, no threadpool will be used.int
Gets the localPort attribute of the RemoteCacheAttributes object.The thread pool the remote cache should use.int
The number of elements the zombie queue will hold.boolean
If RECEIVE is false then the remote cache will not register a listener with the remote server.void
setFailoverIndex
(int p) Sets the failoverIndex attribute of the RemoteCacheAttributes object.void
setFailovers
(List<RemoteLocation> failovers) Sets the failovers attribute of the RemoteCacheAttributes object.void
Sets the failoverServers attribute of the RemoteCacheAttributes 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
setLocalPort
(int p) Sets the localPort attribute of the RemoteCacheAttributes objectvoid
setReceive
(boolean receive) By default this option is true.void
setThreadPoolName
(String name) Set the name of the pool to use.void
setZombieQueueMaxSize
(int zombieQueueMaxSize) The number of elements the zombie queue will hold.toString()
Methods inherited from class org.apache.commons.jcs3.auxiliary.remote.CommonRemoteCacheAttributes
getClusterServers, getGetOnly, getRemoteLocation, getRemoteServiceName, getRemoteType, getRemoteTypeName, getRemoveUponRemotePut, getRmiSocketFactoryTimeoutMillis, isLocalClusterConsistency, setClusterServers, setGetOnly, setLocalClusterConsistency, setRemoteLocation, setRemoteLocation, setRemoteServiceName, setRemoteType, setRemoteTypeName, setRemoveUponRemotePut, setRmiSocketFactoryTimeoutMillis
Methods inherited from class org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCacheAttributes
clone, getCacheName, getEventQueuePoolName, getEventQueueType, getName, setCacheName, setEventQueuePoolName, setEventQueueType, setName
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.commons.jcs3.auxiliary.AuxiliaryCacheAttributes
clone, getCacheName, getEventQueuePoolName, getEventQueueType, getName, setCacheName, setEventQueuePoolName, setEventQueueType, setName
Methods inherited from interface org.apache.commons.jcs3.auxiliary.remote.behavior.ICommonRemoteCacheAttributes
getClusterServers, getGetOnly, getRemoteLocation, getRemoteServiceName, getRemoteType, getRemoteTypeName, getRemoveUponRemotePut, getRmiSocketFactoryTimeoutMillis, isLocalClusterConsistency, setClusterServers, setGetOnly, setLocalClusterConsistency, setRemoteLocation, setRemoteLocation, setRemoteServiceName, setRemoteType, setRemoteTypeName, setRemoveUponRemotePut, setRmiSocketFactoryTimeoutMillis
-
Constructor Details
-
RemoteCacheAttributes
public RemoteCacheAttributes()Default constructor for the RemoteCacheAttributes object
-
-
Method Details
-
getFailoverIndex
Gets the failoverIndex attribute of the RemoteCacheAttributes object.- Specified by:
getFailoverIndex
in interfaceIRemoteCacheAttributes
- Returns:
- The failoverIndex value
-
setFailoverIndex
Sets the failoverIndex attribute of the RemoteCacheAttributes object.- Specified by:
setFailoverIndex
in interfaceIRemoteCacheAttributes
- Parameters:
p
- The new failoverIndex value
-
getFailovers
Gets the failovers attribute of the RemoteCacheAttributes object.- Specified by:
getFailovers
in interfaceIRemoteCacheAttributes
- Returns:
- The failovers value
-
setFailovers
Sets the failovers attribute of the RemoteCacheAttributes object.- Specified by:
setFailovers
in interfaceIRemoteCacheAttributes
- Parameters:
failovers
- The new failovers value
-
getFailoverServers
Gets the failoverServers attribute of the RemoteCacheAttributes object.- Specified by:
getFailoverServers
in interfaceIRemoteCacheAttributes
- Returns:
- The failoverServers value
-
setFailoverServers
Sets the failoverServers attribute of the RemoteCacheAttributes object.- Specified by:
setFailoverServers
in interfaceIRemoteCacheAttributes
- Parameters:
s
- The new failoverServers value
-
getLocalPort
Gets the localPort attribute of the RemoteCacheAttributes object.- Specified by:
getLocalPort
in interfaceIRemoteCacheAttributes
- Returns:
- The localPort value
-
setLocalPort
Sets the localPort attribute of the RemoteCacheAttributes object- Specified by:
setLocalPort
in interfaceIRemoteCacheAttributes
- Parameters:
p
- The new localPort value
-
getThreadPoolName
Description copied from interface:IRemoteCacheAttributes
The thread pool the remote cache should use. At first this will only be for gets.The default name is "remote_cache_client"
- Specified by:
getThreadPoolName
in interfaceIRemoteCacheAttributes
- Returns:
- the name of the pool
-
setThreadPoolName
Description copied from interface:IRemoteCacheAttributes
Set the name of the pool to use. Pools should be defined in the cache.ccf.- Specified by:
setThreadPoolName
in interfaceIRemoteCacheAttributes
- Parameters:
name
-
-
getGetTimeoutMillis
Description copied from interface:IRemoteCacheAttributes
-1 and 0 mean no timeout, this is the default if the timeout is -1 or 0, no threadpool will be used.- Specified by:
getGetTimeoutMillis
in interfaceIRemoteCacheAttributes
- Returns:
- getTimeoutMillis
-
setGetTimeoutMillis
Description copied from interface:IRemoteCacheAttributes
-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.- Specified by:
setGetTimeoutMillis
in interfaceIRemoteCacheAttributes
- Parameters:
millis
-
-
setReceive
By default this option is true. If you set it to false, you will not receive updates or removes from the remote server.- Specified by:
setReceive
in interfaceIRemoteCacheAttributes
- Parameters:
receive
-
-
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 receive any notifications. That is, you will not receive updates or removes.If you set this option to false, you should set your local memory size to 0.
The remote cache manager uses this value to decide whether or not to register a listener.
- Specified by:
isReceive
in interfaceIRemoteCacheAttributes
- Returns:
- the receive value.
-
setZombieQueueMaxSize
The number of elements the zombie queue will hold. This queue is used to store events if we loose our connection with the server.- Specified by:
setZombieQueueMaxSize
in interfaceIRemoteCacheAttributes
- Parameters:
zombieQueueMaxSize
- The zombieQueueMaxSize to set.
-
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.- Specified by:
getZombieQueueMaxSize
in interfaceIRemoteCacheAttributes
- Returns:
- Returns the zombieQueueMaxSize.
-
toString
- Overrides:
toString
in classCommonRemoteCacheAttributes
- Returns:
- String, all the important values that can be configured
-