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_MILLISFields 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 TypeMethodDescriptionintGets 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.intGets the localPort attribute of the RemoteCacheAttributes object.The thread pool the remote cache should use.intThe number of elements the zombie queue will hold.booleanIf RECEIVE is false then the remote cache will not register a listener with the remote server.voidsetFailoverIndex(int p) Sets the failoverIndex attribute of the RemoteCacheAttributes object.voidsetFailovers(List<RemoteLocation> failovers) Sets the failovers attribute of the RemoteCacheAttributes object.voidSets the failoverServers attribute of the RemoteCacheAttributes object.voidsetGetTimeoutMillis(int millis) -1 means no timeout, this is the default if the timeout is -1 or 0, no threadpool will be used.voidsetLocalPort(int p) Sets the localPort attribute of the RemoteCacheAttributes objectvoidsetReceive(boolean receive) By default this option is true.voidsetThreadPoolName(String name) Set the name of the pool to use.voidsetZombieQueueMaxSize(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, setRmiSocketFactoryTimeoutMillisMethods inherited from class org.apache.commons.jcs3.auxiliary.AbstractAuxiliaryCacheAttributes
clone, getCacheName, getEventQueuePoolName, getEventQueueType, getName, setCacheName, setEventQueuePoolName, setEventQueueType, setNameMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.commons.jcs3.auxiliary.AuxiliaryCacheAttributes
clone, getCacheName, getEventQueuePoolName, getEventQueueType, getName, setCacheName, setEventQueuePoolName, setEventQueueType, setNameMethods 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:
getFailoverIndexin interfaceIRemoteCacheAttributes- Returns:
- The failoverIndex value
-
setFailoverIndex
Sets the failoverIndex attribute of the RemoteCacheAttributes object.- Specified by:
setFailoverIndexin interfaceIRemoteCacheAttributes- Parameters:
p- The new failoverIndex value
-
getFailovers
Gets the failovers attribute of the RemoteCacheAttributes object.- Specified by:
getFailoversin interfaceIRemoteCacheAttributes- Returns:
- The failovers value
-
setFailovers
Sets the failovers attribute of the RemoteCacheAttributes object.- Specified by:
setFailoversin interfaceIRemoteCacheAttributes- Parameters:
failovers- The new failovers value
-
getFailoverServers
Gets the failoverServers attribute of the RemoteCacheAttributes object.- Specified by:
getFailoverServersin interfaceIRemoteCacheAttributes- Returns:
- The failoverServers value
-
setFailoverServers
Sets the failoverServers attribute of the RemoteCacheAttributes object.- Specified by:
setFailoverServersin interfaceIRemoteCacheAttributes- Parameters:
s- The new failoverServers value
-
getLocalPort
Gets the localPort attribute of the RemoteCacheAttributes object.- Specified by:
getLocalPortin interfaceIRemoteCacheAttributes- Returns:
- The localPort value
-
setLocalPort
Sets the localPort attribute of the RemoteCacheAttributes object- Specified by:
setLocalPortin interfaceIRemoteCacheAttributes- Parameters:
p- The new localPort value
-
getThreadPoolName
Description copied from interface:IRemoteCacheAttributesThe thread pool the remote cache should use. At first this will only be for gets.The default name is "remote_cache_client"
- Specified by:
getThreadPoolNamein interfaceIRemoteCacheAttributes- Returns:
- the name of the pool
-
setThreadPoolName
Description copied from interface:IRemoteCacheAttributesSet the name of the pool to use. Pools should be defined in the cache.ccf.- Specified by:
setThreadPoolNamein 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:
getGetTimeoutMillisin 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:
setGetTimeoutMillisin 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:
setReceivein 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:
isReceivein 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:
setZombieQueueMaxSizein 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:
getZombieQueueMaxSizein interfaceIRemoteCacheAttributes- Returns:
- Returns the zombieQueueMaxSize.
-
toString
- Overrides:
toStringin classCommonRemoteCacheAttributes- Returns:
- String, all the important values that can be configured
-