net.sf.swarmcache
Class CacheConfiguration

java.lang.Object
  |
  +--net.sf.swarmcache.CacheConfiguration

public class CacheConfiguration
extends java.lang.Object

A class that contains the configuration information to be fed in to a new CacheFactory.

Author:
John Watkinson

Field Summary
static java.lang.String DEFAULT_CHANNEL_PROPERTIES_POST
          The second half of the default channel properties.
static java.lang.String DEFAULT_CHANNEL_PROPERTIES_PRE
          The first half of the default channel properties.
static int DEFAULT_LRU_CACHE_SIZE
          The default LRU cache size.
static java.lang.String DEFAULT_MULTICAST_IP
          The default multicast IP to be used by the cache manager.
static java.lang.String TYPE_AUTO
          The Automatic cache type.
static java.lang.String TYPE_HYBRID
          The Hybrid cache type.
static java.lang.String TYPE_LRU
          The LRU cache type.
static java.lang.String TYPE_TIMER
          The Timer cache type.
 
Constructor Summary
CacheConfiguration()
           
 
Method Summary
 java.lang.String getCacheType()
          Gets the underlying cache type to use on each server.
 java.lang.String getChannelProperties()
          Gets the JavaGroups channel properties.
 java.lang.String getLRUCacheSize()
          Gets the capacity of the LRU cache.
 java.lang.String getMulticastIP()
          Gets the multicast IP address for the JavaGroup.
 void setCacheType(java.lang.String v)
          Sets the underlying cache type to use on each server.
 void setChannelProperties(java.lang.String v)
          Sets the JavaGroup channel properties.
 void setLRUCacheSize(java.lang.String v)
          Sets the capacity of the LRU cache.
 void setMulticastIP(java.lang.String v)
          Sets the multicast IP address for the JavaGroup.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CHANNEL_PROPERTIES_PRE

public static final java.lang.String DEFAULT_CHANNEL_PROPERTIES_PRE
The first half of the default channel properties. They default channel properties are:
 UDP(mcast_addr=*.*.*.*;mcast_port=45566;ip_ttl=32;mcast_send_buf_size=150000;mcast_recv_buf_size=80000):PING(timeout=2000;num_initial_members=3):MERGE2(min_interval=5000;max_interval=10000):FD_SOCK:VERIFY_SUSPECT(timeout=1500):pbcast.NAKACK(gc_lag=50;retransmit_timeout=300,600,1200,2400,4800):UNICAST(timeout=5000):pbcast.STABLE(desired_avg_gossip=20000):FRAG(frag_size=8096;down_thread=false;up_thread=false):pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;shun=false;print_local_addr=true)
 
Where *.*.*.* is the specified multicast IP, which defaults to 231.12.21.132.

See Also:
Constant Field Values

DEFAULT_CHANNEL_PROPERTIES_POST

public static final java.lang.String DEFAULT_CHANNEL_PROPERTIES_POST
The second half of the default channel properties. They default channel properties are:
 UDP(mcast_addr=*.*.*.*;mcast_port=45566;ip_ttl=32;mcast_send_buf_size=150000;mcast_recv_buf_size=80000):PING(timeout=2000;num_initial_members=3):MERGE2(min_interval=5000;max_interval=10000):FD_SOCK:VERIFY_SUSPECT(timeout=1500):pbcast.NAKACK(gc_lag=50;retransmit_timeout=300,600,1200,2400,4800):UNICAST(timeout=5000):pbcast.STABLE(desired_avg_gossip=20000):FRAG(frag_size=8096;down_thread=false;up_thread=false):pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;shun=false;print_local_addr=true)
 
Where *.*.*.* is the specified multicast IP, which defaults to 231.12.21.132.

See Also:
Constant Field Values

DEFAULT_MULTICAST_IP

public static final java.lang.String DEFAULT_MULTICAST_IP
The default multicast IP to be used by the cache manager. Its value is 231.12.21.132.

See Also:
Constant Field Values

DEFAULT_LRU_CACHE_SIZE

public static final int DEFAULT_LRU_CACHE_SIZE
The default LRU cache size. Its value is 10000.

See Also:
Constant Field Values

TYPE_LRU

public static final java.lang.String TYPE_LRU
The LRU cache type.

See Also:
Constant Field Values

TYPE_AUTO

public static final java.lang.String TYPE_AUTO
The Automatic cache type.

See Also:
Constant Field Values

TYPE_TIMER

public static final java.lang.String TYPE_TIMER
The Timer cache type.

See Also:
Constant Field Values

TYPE_HYBRID

public static final java.lang.String TYPE_HYBRID
The Hybrid cache type.

See Also:
Constant Field Values
Constructor Detail

CacheConfiguration

public CacheConfiguration()
Method Detail

getChannelProperties

public java.lang.String getChannelProperties()
Gets the JavaGroups channel properties. If not specified, default properties will be generated using the multicast IP. Either this or the multicast IP must be set, or else null will be returned.


setChannelProperties

public void setChannelProperties(java.lang.String v)
Sets the JavaGroup channel properties. See the JavaGroups homepage for more imformation. If not specified, default properties will be generated using the multicast IP. Either this or the multicast IP must be set.


getMulticastIP

public java.lang.String getMulticastIP()
Gets the multicast IP address for the JavaGroup.


setMulticastIP

public void setMulticastIP(java.lang.String v)
Sets the multicast IP address for the JavaGroup.


getCacheType

public java.lang.String getCacheType()
Gets the underlying cache type to use on each server. The two options are LRU and Auto.


setCacheType

public void setCacheType(java.lang.String v)
Sets the underlying cache type to use on each server. The two options are LRU and Auto.


getLRUCacheSize

public java.lang.String getLRUCacheSize()
Gets the capacity of the LRU cache. If the cache type is LRU, then this is the maximum number of objects in the LRU queue. Otherwise, this is ignored.


setLRUCacheSize

public void setLRUCacheSize(java.lang.String v)
Sets the capacity of the LRU cache. If the cache type is LRU, then this is the maximum number of objects in the LRU queue. Otherwise, this is ignored.