[jboss-user] [JBoss Cache] New message: "Re: Flushing data to disk"
Mircea Markus
do-not-reply at jboss.com
Thu Feb 18 05:32:05 EST 2010
User development,
A new message was posted in the thread "Flushing data to disk":
http://community.jboss.org/message/526942#526942
Author : Mircea Markus
Profile : http://community.jboss.org/people/mircea.markus
Message:
--------------------------------------------------------------
you should have eviction enabled and a cache loader with passivation.
> <eviction wakeUpInterval="500">
> <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="200000">
> <property name="maxNodes" value="5000"/>
> <property name="timeToLive" value="1000"/>
> </default>
> <region name="/org/jboss/data1">
> <property name="timeToLive" value="2000"/>
> </region>
> <region name="/org/jboss/data2" algorithmClass="org.jboss.cache.eviction.FIFOAlgorithm" eventQueueSize="100000">
> <property name="maxNodes" value="3000"/>
> <property name="minTimeToLive" value="4000"/>
> </region>
> </eviction>
>
> <!--
> Cache loaders.
>
> If passivation is enabled, state is offloaded to the cache loaders ONLY when evicted. Similarly, when the state
> is accessed again, it is removed from the cache loader and loaded into memory.
>
> Otherwise, state is always maintained in the cache loader as well as in memory.
>
> Set 'shared' to true if all instances in the cluster use the same cache loader instance, e.g., are talking to the
> same database.
> -->
> <loaders passivation="true" shared="false">
> <preload>
> <node fqn="/org/jboss"/>
> <node fqn="/org/tempdata"/>
> </preload>
>
> <!--
> we can have multiple cache loaders, which get chained
> -->
> <loader class="org.jboss.cache.loader.JDBCCacheLoader" async="true" fetchPersistentState="true"
> ignoreModifications="true" purgeOnStartup="true">
>
> <properties>
> cache.jdbc.table.name=jbosscache
> cache.jdbc.table.create=true
> cache.jdbc.table.drop=true
> cache.jdbc.table.primarykey=jbosscache_pk
> cache.jdbc.fqn.column=fqn
> cache.jdbc.fqn.type=VARCHAR(255)
> cache.jdbc.node.column=node
> cache.jdbc.node.type=BINARY
> cache.jdbc.parent.column=parent
> cache.jdbc.driver=org.hsqldb.jdbcDriver
> cache.jdbc.url=jdbc:hsqldb:mem:jbosscache
> cache.jdbc.user=sa
> cache.jdbc.password=
> </properties>
> <!-- alternatively use a connection from a datasorce, as per the code sample below-->
> <!--<properties>-->
> <!--cache.jdbc.datasource=AllSampleDS-->
> <!--cache.jdbc.table.name=jbosscache-->
> <!--cache.jdbc.table.create=true-->
> <!--cache.jdbc.table.drop=true-->
> <!--</properties>-->
> <singletonStore enabled="true" class="org.jboss.cache.loader.SingletonStoreCacheLoader">
> <properties>
> pushStateWhenCoordinator=true
> pushStateWhenCoordinatorTimeout=20000
> </properties>
> </singletonStore>
> </loader>
> </loaders>
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/526942#526942
More information about the jboss-user
mailing list