[jboss-cvs] JBossCache/docs/JBossCache-UserGuide/en/modules ...
Galder Zamarreno
galder.zamarreno at jboss.com
Wed Jul 18 14:35:26 EDT 2007
User: gzamarreno
Date: 07/07/18 14:35:26
Modified: docs/JBossCache-UserGuide/en/modules cache_loaders.xml
Log:
[JBCACHE-1091] Rest of documention for SSCL.
Revision Changes Path
1.15 +160 -98 JBossCache/docs/JBossCache-UserGuide/en/modules/cache_loaders.xml
(In the diff below, changes in quantity of whitespace are not shown.)
Index: cache_loaders.xml
===================================================================
RCS file: /cvsroot/jboss/JBossCache/docs/JBossCache-UserGuide/en/modules/cache_loaders.xml,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- cache_loaders.xml 31 May 2007 05:21:56 -0000 1.14
+++ cache_loaders.xml 18 Jul 2007 18:35:26 -0000 1.15
@@ -193,10 +193,23 @@
<purgeOnStartup>false</purgeOnStartup>
<!-- defines the cache loader as a singleton store where only the coordinator of the
- cluster will store modifications. Setting pushStateWhenCoordinator to true enables a
- newly elected coordinator to push the in-memory state to the underlying cache store.
- Both default to false. -->
- <singletonStore pushStateWhenCoordinator="false">false</singletonStore>
+ cluster will store modifications. -->
+ <singletonStore>
+ <!-- if true, singleton store functionality is enabled, defaults to false -->
+ <enabled>false</enabled>
+
+ <!-- implementation class for singleton store functionality which must extend
+ org.jboss.cache.loader.AbstractDelegatingCacheLoader. Default implementation
+ is org.jboss.cache.loader.SingletonStoreCacheLoader -->
+ <class>org.jboss.cache.loader.SingletonStoreCacheLoader</class>
+
+ <!-- properties and default values for the default singleton store functionality
+ implementation -->
+ <properties>
+ pushStateWhenCoordinator=true
+ pushStateWhenCoordinatorTimeout=20000
+ </properties>
+ </singletonStore>
</cacheloader>
</config>
@@ -205,8 +218,8 @@
</programlisting>
<para>The
- <literal>CacheLoaderClass</literal>
- attribute defines the
+ <literal>class</literal>
+ element defines the
class of the cache loader implementation. (Note that, because of a bug in
the properties editor in JBoss AS, backslashes in variables for Windows
filenames might not get expanded correctly, so replace="false" may be
@@ -322,45 +335,106 @@
</para>
<para>
+ <literal>shared</literal>
+ indicates that the cache loader is shared among different cache instances, for example where all instances in a
+ cluster use the same JDBC settings t talk to the same remote, shared database. Setting this to
+ <literal>true</literal>
+ prevents repeated and unnecessary writes of the same data to the cache loader by different cache instances.
+ Default value is
+ <literal>false</literal>
+ .
+ </para>
+
+ <section>
+ <title>Singleton Store Configuration</title>
+
+ <para>
<literal>singletonStore</literal>
- enables modifications to be stored by only one node in the cluster,
+ element enables modifications to be stored by only one node in the cluster,
the coordinator. Essentially, whenever any data comes in to some node
it is always replicated so as to keep the caches' in-memory states in
sync; the coordinator, though, has the sole responsibility of pushing
- that state to disk. This property can be set to true in all nodes, but
+ that state to disk. This functionality can be activated setting the
+ <literal>enabled</literal>
+ subelement to true in all nodes, but
again only the coordinator of the cluster will store the modifications
- in the underlying cache loader as specified in the
- <literal>class</literal>
- element inside the
+ in the underlying cache loader as defined in
<literal>cacheloader</literal>
element. You cannot define a cache loader as
<literal>shared</literal>
- and
+ and with
<literal>singletonStore</literal>
- at the same time.
- Default value is
+ enabled at the same time.
+ Default value for
+ <literal>enabled</literal>
+ is
<literal>false</literal>
.
</para>
<para>
+ Optionally, within the
+ <literal>singletonStore</literal>
+ element, you can define a
+ <literal>class</literal>
+ element that specifies the implementation class that provides the
+ singleton store functionality. This class must extend
+ <literal>org.jboss.cache.loader.AbstractDelegatingCacheLoader</literal>
+ , and if absent, it defaults to
+ <literal>org.jboss.cache.loader.SingletonStoreCacheLoader</literal>
+ .
+ </para>
+
+ <para>
+ The
+ <literal>properties</literal>
+ subelement defines properties that allow changing the behaivour of the
+ class providing the singleton store functionality. By default,
+ <literal>pushStateWhenCoordinator</literal>
+ and
+ <literal>pushStateWhenCoordinatorTimeout</literal>
+ properties have been defined, but more could be added as
+ required by the user-defined class providing singleton store
+ functionality.
+ </para>
+
+ <para>
<literal>pushStateWhenCoordinator</literal>
allows the in-memory
state to be pushed to the cache store when a node becomes the
coordinator, as a result of the new election of coordinator due to a
cluster topology change. This can be very useful in situations where the
coordinator crashes and there's a gap in time until the new coordinator
- is elected. During this time, if this property was set to false and the
+ is elected. During this time, if this property was set to
+ <literal>false</literal>
+ and the
cache was updated, these changes would never be persisted. Setting this
- property to true would ensure that any changes during this process also
+ property to
+ <literal>true</literal>
+ would ensure that any changes during this process also
get stored in the cache loader. You would also want to set this property
- to true if each node's cache loader is configured with a different
+ to
+ <literal>true</literal>
+ if each node's cache loader is configured with a different
location. Default value is
- <literal>false</literal>
+ <literal>true</literal>
.
</para>
<para>
+ <literal>pushStateWhenCoordinatorTimeout</literal>
+ is only relevant if
+ <literal>pushStateWhenCoordinator</literal>
+ is
+ <literal>true</literal>
+ in which case, sets the maximum number of milliseconds that the process
+ of pushing the in-memory state to the underlying cache loader should take,
+ reporting a
+ <literal>PushStateException</literal>
+ if exceeded. Default value is 20000.
+ </para>
+
+ <para>
<emphasis role="bold">Note on using the
<literal>singletonStore</literal>
element:
@@ -375,19 +449,7 @@
in the cluster when either, the coordinator leaves the cluster, the
coordinator crashes or stops responding.
</para>
-
- <para>
- <literal>shared</literal>
- indicates that the cache loader is shared among different cache instances, for example where all instances in a
- cluster use the same JDBC settings t talk to the same remote, shared database. Setting this to
- <literal>true</literal>
- prevents repeated and unnecessary writes of the same data to the cache loader by different cache instances.
- Default value is
- <literal>false</literal>
- .
- </para>
-
-
+ </section>
</section>
<section id="cl.impls">
More information about the jboss-cvs-commits
mailing list