Deprecation

This document is DEPRECATED.

Please consider any information here as out of date. DO NOT use this document.

Instead, refer to http://infinispan.org/documentation.

Please update your bookmarks accordingly.

Skip to end of metadata
Go to start of metadata

Infinispan's CassandraCacheStore leverages Apache Cassandra's distributed database architecture to provide a virtually unlimited, horizontally scalable persistent store for Infinispan's caches.

Version

The Cassandra CacheStore was added in Infinspan 4.2.0 "Ursus". You'll need this release or later in order to use it.

Configuration

In order to use this CacheStore you need to create an appropriate  keyspace on your Cassandra database. The following storage-conf.xml  excerpt shows the declaration of the keyspace:

socketTimeout = 5000
initialSize = 10
maxActive = 100
maxIdle = 20
minIdle = 10
maxWait = 30000testOnBorrow = false
testOnReturn = false
testWhileIdle = false
timeBetweenEvictionRunsMillis = 5000removeAbandoned = false
removeAbandonedTimeout = 60
logAbandoned = false
{code}
Here is a description of the various properties which can be configured:
Header 1 Header 2

host a hostname (or a comma-separated list of hostnames)
port the thrift port (usually 9160)
keySpace the keyspace to use (defaults to Infinispan)
entryColumnFamily the column family where entry values will be stored. Make sure you configure your keyspace accordingly (defaults to InfinispanEntries)
expirationColumnFamily the column family where element expiration information is stored. Make sure your  (defaults to InfinispanExpiration)
sharedKeyspace whether multiple caches are to be stored in a single keyspace. In this case the cache name is prefixed to the key entries (defaults to false).
readConsistencyLevel The consistency level to use when reading from Cassandra. Possible values are ONE, QUORUM, DCQUORUM, ALL. For an explanation of these refer to the Cassandra API documentation. (defaults to ONE)
writeConsistencyLevel The consistency level to use when writing to Cassandra. Possible values are ZERO, ANY, ONE, QUORUM, DCQUORUM, ALL. For an explanation of these refer to the Cassandra API documentation. (defaults to ONE)
keyMapper A class which implements Infinispan's TwoWayKey2StringMapper interface for mapping cache keys to Cassandra row keys (defaults to org.infinispan.loaders.keymappers.DefaultTwoWayKey2StringMapper)
Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.