[jbosscache-commits] JBoss Cache SVN: r6274 - core/trunk/src/main/resources/config-samples.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Tue Jul 15 10:59:39 EDT 2008


Author: mircea.markus
Date: 2008-07-15 10:59:39 -0400 (Tue, 15 Jul 2008)
New Revision: 6274

Added:
   core/trunk/src/main/resources/config-samples/invalidation-async.xml
Removed:
   core/trunk/src/main/resources/config-samples/optimistically-locked.xml
Modified:
   core/trunk/src/main/resources/config-samples/buddy-replication.xml
   core/trunk/src/main/resources/config-samples/cacheloader-enabled.xml
   core/trunk/src/main/resources/config-samples/eviction-enabled.xml
   core/trunk/src/main/resources/config-samples/local.xml
   core/trunk/src/main/resources/config-samples/multiplexer-enabled.xml
Log:
added comments to configuration files

Modified: core/trunk/src/main/resources/config-samples/buddy-replication.xml
===================================================================
--- core/trunk/src/main/resources/config-samples/buddy-replication.xml	2008-07-15 13:56:25 UTC (rev 6273)
+++ core/trunk/src/main/resources/config-samples/buddy-replication.xml	2008-07-15 14:59:39 UTC (rev 6274)
@@ -2,11 +2,31 @@
 
 <jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:noNamespaceSchemaLocation="http://www.jboss.org/jbosscache/jbosscache-config-3.0.xsd">
-   
+
+   <!--
+       isolationLevel :   SERIALIZABLE - (not supported in mvcc)
+                            REPEATABLE_READ (default)
+                            READ_COMMITTED
+                            READ_UNCOMMITTED (not supported in mvcc)
+                            NONE
+       lockAcquisitionTimeout: max number of milliseconds to wait for a lock acquisition
+       nodeLockingScheme : mvcc (default)
+                           optimistic
+                           pessimistic
+   -->
    <locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="10000" nodeLockingScheme="mvcc"/>
+
+   <!-- Configure the TransactionManager -->
    <transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
+
+  <!--   
+   timeout: The max amount of time (in milliseconds) we wait until the state (ie. the contents of the cache) is 
+            retrieved from existing members in a clustered environment
+  -->
    <stateRetrieval timeout="20000"/>
+
    <transport clusterName="JBossCache-Cluster">
+      <!-- JGroups protocol stack properties. -->
       <jgroupsConfig>
          <TCP discard_incompatible_packets="true" enable_bundling="true" enable_diagnostics="true"
               enable_unicast_bundling="true" loopback="false" max_bundle_size="64000" max_bundle_timeout="30"
@@ -33,11 +53,36 @@
          <pbcast.FLUSH timeout="0"/>
       </jgroupsConfig>
    </transport>
+
+
+   <!-- this is a replicated cache-->
    <replication>
+      <!-- Number of milliseconds to wait until all responses for a synchronous call have been received -->
       <sync replTimeout="15000"/>
+
+      <!--
+        poolName: A way to specify a preferred replication group.  If specified, we try and pick a buddy why shares
+                     the same pool name (falling back to other buddies if not available).  This allows the sysdmin
+                     to hint at backup buddies are picked, so for example, nodes may be hinted topick buddies
+                     on a different physical rack or power supply for added fault tolerance.
+        communicationTimeout : communication timeout for inter-buddy group organisation messages (such as assigning
+                              to and removing from groups
+                       -->
       <buddy enabled="true" poolName="myBuddyPoolReplicationGroup" communicationTimeout="2000">
+
+         <!--
+         auto : Should data gravitation be attempted whenever there is a cache miss on finding a node?
+                If false, data will only be gravitated if an Option is set enabling it
+         removeOnFind: removes data on remote caches' trees and backup subtrees when gravitated to a
+                       new data owner
+         searchBackupTrees: search backup subtrees as well for data when gravitating.  Results in backup nodes
+                            being able to answer data gravitation requests.-->
          <dataGravitation auto="false" removeOnFind="true" searchBackupTrees="true"/>
+
          <locator class="org.jboss.cache.buddyreplication.NextMemberBuddyLocator">
+            <!-- numBuddies is the number of backup nodes each node maintains.  ignoreColocatedBuddies means that
+           each node will *try* to select a buddy on a different physical host.  If not able to do so though,
+            it will fall back to colocated nodes. -->
             <properties>
                numBuddies = 1
                ignoreColocatedBuddies = true

Modified: core/trunk/src/main/resources/config-samples/cacheloader-enabled.xml
===================================================================
--- core/trunk/src/main/resources/config-samples/cacheloader-enabled.xml	2008-07-15 13:56:25 UTC (rev 6273)
+++ core/trunk/src/main/resources/config-samples/cacheloader-enabled.xml	2008-07-15 14:59:39 UTC (rev 6274)
@@ -1,9 +1,26 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:noNamespaceSchemaLocation="http://www.jboss.org/jbosscache/jbosscache-config-3.0.xsd">
+
+   <!--
+       isolationLevel :   SERIALIZABLE - (not supported in mvcc)
+                            REPEATABLE_READ (default)
+                            READ_COMMITTED
+                            READ_UNCOMMITTED (not supported in mvcc)
+                            NONE
+       lockAcquisitionTimeout: max number of milliseconds to wait for a lock acquisition
+       nodeLockingScheme : mvcc (default)
+                           optimistic
+                           pessimistic
+   -->
    <locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="15000" nodeLockingScheme="mvcc"/>
+
+   <!-- Configure the TransactionManager -->
    <transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
+
+   <!-- Specific eviction policy configurations -->
    <eviction wakeUpInterval="5000" defaultPolicyClass="org.jboss.cache.eviction.LRUPolicy" defaultEventQueueSize="200000">
+      <!-- Cache wide default -->
       <default>
          <attribute name="maxNodes">5000</attribute>
          <attribute name="timeToLiveSeconds">3</attribute>
@@ -13,10 +30,17 @@
          <attribute name="timeToLiveSeconds">3</attribute>
       </region>
    </eviction>
+
+   <!-- Cache Passivation for Tree Cache
+   On pasivation, The objects are written to the backend store on eviction if passivation
+   is true, otheriwse the objects are persisted. On activation, the objects are restored in
+   the memory cache and removed from the cache loader if 'passivation' attribute is true,
+   otherwise the objects are only loaded from the cache loader -->   
    <loaders passivation="false" shared="false">
       <preload>
          <node fqn="/"/>
       </preload>
+      <!-- if passivation is true, only the first cache loader is used; the rest are ignored -->
       <loader class="org.jboss.cache.loader.JDBCCacheLoader" async="false" fetchPersistentState="true"
               ignoreModifications="false" purgeOnStartup="false">
          <properties>

Modified: core/trunk/src/main/resources/config-samples/eviction-enabled.xml
===================================================================
--- core/trunk/src/main/resources/config-samples/eviction-enabled.xml	2008-07-15 13:56:25 UTC (rev 6273)
+++ core/trunk/src/main/resources/config-samples/eviction-enabled.xml	2008-07-15 14:59:39 UTC (rev 6274)
@@ -1,13 +1,37 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:noNamespaceSchemaLocation="http://www.jboss.org/jbosscache/jbosscache-config-3.0.xsd">
+
+   <!--
+       isolationLevel :   SERIALIZABLE - (not supported in mvcc)
+                            REPEATABLE_READ (default)
+                            READ_COMMITTED
+                            READ_UNCOMMITTED (not supported in mvcc)
+                            NONE
+       lockAcquisitionTimeout: max number of milliseconds to wait for a lock acquisition
+       nodeLockingScheme : mvcc (default)
+                           optimistic
+                           pessimistic
+   -->
    <locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="15000" nodeLockingScheme="mvcc"/>
+
+   <!-- Configure the TransactionManager -->
    <transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
+
+   <!--
+      wakeUpInterval: time interval (millis) when the eviction thread kicks in
+      defaultPolicyClass: if policy class is not specified for a region, this one is considered as default
+      defaultEventQueueSize  if policy event queue size is not specified for a region, this one is considered as default
+   -->
    <eviction wakeUpInterval="5000" defaultPolicyClass="org.jboss.cache.eviction.LRUPolicy" defaultEventQueueSize="200000">
+
+      <!-- Cache wide default -->
       <default>
          <attribute name="maxNodes">5000</attribute>
          <attribute name="timeToLiveSeconds">1000</attribute>
       </default>
+
+      <!-- configurations for various regions--> 
       <region name="/org/jboss/data">
          <attribute name="maxNodes">5000</attribute>
          <attribute name="timeToLiveSeconds">1000</attribute>

Copied: core/trunk/src/main/resources/config-samples/invalidation-async.xml (from rev 6273, core/trunk/src/main/resources/config-samples/optimistically-locked.xml)
===================================================================
--- core/trunk/src/main/resources/config-samples/invalidation-async.xml	                        (rev 0)
+++ core/trunk/src/main/resources/config-samples/invalidation-async.xml	2008-07-15 14:59:39 UTC (rev 6274)
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:noNamespaceSchemaLocation="http://www.jboss.org/jbosscache/jbosscache-config-3.0.xsd">
+
+   <!--
+       isolationLevel :   SERIALIZABLE - (not supported in mvcc)
+                            REPEATABLE_READ (default)
+                            READ_COMMITTED
+                            READ_UNCOMMITTED (not supported in mvcc)
+                            NONE
+       lockAcquisitionTimeout: max number of milliseconds to wait for a lock acquisition
+       nodeLockingScheme : mvcc (default)
+                           optimistic
+                           pessimistic
+   -->
+   <locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="10000" nodeLockingScheme="mvcc"/>
+
+   <!-- Configure the TransactionManager -->
+   <transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
+
+  <!--
+   timeout: The max amount of time (in milliseconds) we wait until the
+            state (ie. the contents of the cache) are retrieved from
+            existing members in a clustered environment
+  -->
+   <stateRetrieval timeout="20000"/>
+
+   <transport clusterName="JBossCache-Cluster">
+      <!-- JGroups protocol stack properties. -->
+      <jgroupsConfig>
+         <TCP discard_incompatible_packets="true" enable_bundling="true" enable_diagnostics="true"
+              enable_unicast_bundling="true" loopback="false" max_bundle_size="64000" max_bundle_timeout="30"
+              oob_thread_pool.enabled="true" oob_thread_pool.keep_alive_time="10000" oob_thread_pool.max_threads="4"
+              oob_thread_pool.min_threads="2" oob_thread_pool.queue_enabled="false" oob_thread_pool.queue_max_size="10"
+              oob_thread_pool.rejection_policy="Run" recv_buf_size="20000000" thread_naming_pattern="pl"
+              thread_pool.enabled="true" thread_pool.keep_alive_time="30000" thread_pool.max_threads="4"
+              thread_pool.min_threads="1" thread_pool.queue_enabled="true" thread_pool.queue_max_size="50000"
+              thread_pool.rejection_policy="discard" use_concurrent_stack="true" use_incoming_packet_handler="true"
+              use_send_queues="false"/>
+         <MPING mcast_addr="232.1.2.3" num_initial_members="3" timeout="2000"/>
+         <MERGE2 max_interval="30000" min_interval="10000"/>
+         <FD_SOCK/>
+         <FD max_tries="5" shun="true" timeout="10000"/>
+         <VERIFY_SUSPECT timeout="1500"/>
+         <pbcast.NAKACK discard_delivered_msgs="true" gc_lag="0" retransmit_timeout="300,600,1200,2400,4800"
+                        use_mcast_xmit="false"/>
+         <pbcast.STABLE desired_avg_gossip="50000" max_bytes="400000" stability_delay="1000"/>
+         <pbcast.GMS join_retry_timeout="2000" join_timeout="5000" print_local_addr="true" shun="false"
+                     view_ack_collection_timeout="5000" view_bundling="true"/>
+         <FC max_credits="5000000" min_threshold="0.20"/>
+         <FRAG2 frag_size="60000"/>
+         <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
+         <pbcast.FLUSH timeout="0"/>
+      </jgroupsConfig>
+   </transport>
+
+   <!-- this uses replication rather than invalidation -->
+   <invalidation>
+      <!-- invalidation messages are not being sent synchronously -->
+      <async useReplQueue="false"/>
+   </invalidation>
+</jbosscache>

Modified: core/trunk/src/main/resources/config-samples/local.xml
===================================================================
--- core/trunk/src/main/resources/config-samples/local.xml	2008-07-15 13:56:25 UTC (rev 6273)
+++ core/trunk/src/main/resources/config-samples/local.xml	2008-07-15 14:59:39 UTC (rev 6274)
@@ -1,6 +1,24 @@
 <?xml version="1.0" encoding="UTF-8"?>
+
 <jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:noNamespaceSchemaLocation="http://www.jboss.org/jbosscache/jbosscache-config-3.0.xsd">
+
+   <!-- By not specifying neither an 'replication' nor an 'invalidation' element, the cache is defaulted to local -->
+
+
+   <!--
+       isolcationLevels :   SERIALIZABLE - (not supported in mvcc)
+                            REPEATABLE_READ (default)
+                            READ_COMMITTED
+                            READ_UNCOMMITTED (not supported in mvcc)
+                            NONE
+       lockAcquisitionTimeout: max number of milliseconds to wait for a lock acquisition
+       nodeLockingScheme : mvcc (default)
+                           optimistic
+                           pessimistic
+   -->
    <locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="15000" nodeLockingScheme="mvcc"/>
+
+      <!-- Configure the TransactionManager -->
    <transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
 </jbosscache>

Modified: core/trunk/src/main/resources/config-samples/multiplexer-enabled.xml
===================================================================
--- core/trunk/src/main/resources/config-samples/multiplexer-enabled.xml	2008-07-15 13:56:25 UTC (rev 6273)
+++ core/trunk/src/main/resources/config-samples/multiplexer-enabled.xml	2008-07-15 14:59:39 UTC (rev 6274)
@@ -1,41 +1,60 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:noNamespaceSchemaLocation="http://www.jboss.org/jbosscache/jbosscache-config-3.0.xsd">
+
+   <!--
+       isolationLevel :   SERIALIZABLE - (not supported in mvcc)
+                            REPEATABLE_READ (default)
+                            READ_COMMITTED
+                            READ_UNCOMMITTED (not supported in mvcc)
+                            NONE
+       lockAcquisitionTimeout: max number of milliseconds to wait for a lock acquisition
+       nodeLockingScheme : mvcc (default)
+                           optimistic
+                           pessimistic
+   -->
    <locking isolationLevel="REPEATABLE_READ" lockAcquisitionTimeout="10000" nodeLockingScheme="mvcc"/>
+
+   <!-- Configure the TransactionManager -->
    <transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
+
+   <!--
+    timeout: The max amount of time (in milliseconds) we wait until the
+             state (ie. the contents of the cache) are retrieved from
+             existing members in a clustered environment
+   -->
    <stateRetrieval timeout="20000"/>
-   <transport clusterName="JBossCache-Cluster" multiplexerStack="fc-fast-minimalthreads">
-      <jgroupsConfig>
-         <TCP recv_buf_size="20000000" use_send_queues="false" loopback="false" discard_incompatible_packets="true"
-              max_bundle_size="64000" max_bundle_timeout="30" use_incoming_packet_handler="true" enable_bundling="true"
-              enable_unicast_bundling="true" enable_diagnostics="true" use_concurrent_stack="true"
-              thread_naming_pattern="pl" thread_pool.enabled="true" thread_pool.min_threads="1"
-              thread_pool.max_threads="4" thread_pool.keep_alive_time="30000" thread_pool.queue_enabled="true"
-              thread_pool.queue_max_size="50000" thread_pool.rejection_policy="discard" oob_thread_pool.enabled="true"
-              oob_thread_pool.min_threads="2" oob_thread_pool.max_threads="4" oob_thread_pool.keep_alive_time="10000"
-              oob_thread_pool.queue_enabled="false" oob_thread_pool.queue_max_size="10"
-              oob_thread_pool.rejection_policy="Run"/>
-         <MPING mcast_addr="232.1.2.3" timeout="2000" num_initial_members="3"/>
-         <MERGE2 max_interval="30000" min_interval="10000"/>
-         <FD_SOCK/>
-         <FD timeout="10000" max_tries="5" shun="true"/>
-         <VERIFY_SUSPECT timeout="1500"/>
-         <pbcast.NAKACK use_mcast_xmit="false" gc_lag="0" retransmit_timeout="300,600,1200,2400,4800"
-                        discard_delivered_msgs="true"/>
-         <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000" max_bytes="400000"/>
-         <pbcast.GMS print_local_addr="true" join_timeout="5000" join_retry_timeout="2000" shun="false"
-                     view_bundling="true" view_ack_collection_timeout="5000"/>
-         <FC max_credits="5000000" min_threshold="0.20"/>
-         <FRAG2 frag_size="60000"/>
-         <pbcast.STREAMING_STATE_TRANSFER use_reading_thread="true"/>
-         <pbcast.FLUSH timeout="0"/>
-      </jgroupsConfig>
-   </transport>
+
+   <!-- here is where we specify the multiplexer stack -->
+   <transport clusterName="JBossCache-Cluster" multiplexerStack="fc-fast-minimalthreads"/>
+
+   <!-- this is replicated cache-->
    <replication>
+      <!-- Number of milliseconds to wait until all responses for a
+          synchronous call have been received -->
       <sync replTimeout="15000"/>
+
+      <!-- poolName: A way to specify a preferred replication group.  If specified, we try and pick a buddy why shares
+                     the same pool name (falling back to other buddies if not available).  This allows the sysdmin
+                     to hint at backup buddies are picked, so for example, nodes may be hinted topick buddies
+                     on a different physical rack or power supply for added fault tolerance.
+        communicationTimeout : communication timeout for inter-buddy group organisation messages (such as assigning
+                              to and removing from groups
+                       -->
       <buddy enabled="true" poolName="myBuddyPoolReplicationGroup" communicationTimeout="2000">
+
+         <!-- auto : Should data gravitation be attempted whenever there is a cache miss on finding a node?
+                     If false, data will only be gravitated if an Option is set enabling it
+       removeOnFind: removes data on remote caches' trees and backup subtrees when gravitated to a
+                     new data owner
+       searchBackupTrees: search backup subtrees as well for data when gravitating.  Results in backup nodes
+                           being able to answer data gravitation requests.-->
          <dataGravitation auto="false" removeOnFind="true" searchBackupTrees="true"/>
+
          <locator class="org.jboss.cache.buddyreplication.NextMemberBuddyLocator">
+            <!-- numBuddies is the number of backup nodes each node maintains.  ignoreColocatedBuddies means that
+           each node will *try* to select a buddy on a different physical host.  If not able to do so though,
+            it will fall back to colocated nodes. -->
             <properties>
                numBuddies = 1
                ignoreColocatedBuddies = true
@@ -43,4 +62,5 @@
          </locator>
       </buddy>
    </replication>
+   
 </jbosscache>

Deleted: core/trunk/src/main/resources/config-samples/optimistically-locked.xml
===================================================================
--- core/trunk/src/main/resources/config-samples/optimistically-locked.xml	2008-07-15 13:56:25 UTC (rev 6273)
+++ core/trunk/src/main/resources/config-samples/optimistically-locked.xml	2008-07-15 14:59:39 UTC (rev 6274)
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-            xsi:noNamespaceSchemaLocation="http://www.jboss.org/jbosscache/jbosscache-config-3.0.xsd">
-   <locking isolationLevel="READ_COMMITTED" lockAcquisitionTimeout="10000" nodeLockingScheme="optimistic"/>
-   <transaction transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup"/>
-   <stateRetrieval fetchInMemoryState="false"/>
-   <eviction wakeUpInterval="1000" defaultPolicyClass="org.jboss.cache.eviction.LRUPolicy">
-      <default>
-         <attribute name="maxNodes">10</attribute>
-         <attribute name="timeToLiveSeconds">0</attribute>
-         <attribute name="maxAgeSeconds">0</attribute>
-      </default>
-      <region name="/testingRegion">
-         <attribute name="maxNodes">10</attribute>
-         <attribute name="timeToLiveSeconds">0</attribute>
-         <attribute name="maxAgeSeconds">0</attribute>
-      </region>
-      <region name="/timeBased">
-         <attribute name="maxNodes">10</attribute>
-         <attribute name="timeToLiveSeconds">1</attribute>
-         <attribute name="maxAgeSeconds">1</attribute>
-      </region>
-   </eviction>
-</jbosscache>




More information about the jbosscache-commits mailing list