GigaSpaces XAP 9.7.2 API

org.openspaces.persistency.cassandra
Class CassandraSpaceDataSourceConfigurer

java.lang.Object
  extended by org.openspaces.persistency.cassandra.CassandraSpaceDataSourceConfigurer

public class CassandraSpaceDataSourceConfigurer
extends Object

A configurer for creating CassandraSpaceDataSource instances.

Since:
9.1.1
Author:
Dan Kilman

Field Summary
protected  int batchLimit
           
protected  CassandraDataSource cassandraDataSource
           
protected  PropertyValueSerializer dynamicPropertyValueSerializer
           
protected  PropertyValueSerializer fixedPropertyValueSerializer
           
protected  HectorCassandraClient hectorClient
           
protected  int maximumNumberOfConnections
           
protected  int minimumNumberOfConnections
           
 
Constructor Summary
CassandraSpaceDataSourceConfigurer()
           
 
Method Summary
 CassandraSpaceDataSourceConfigurer batchLimit(int batchLimit)
          Optional.
 CassandraSpaceDataSourceConfigurer cassandraDataSource(CassandraDataSource cassandraDataSource)
           
 CassandraSpaceDataSource create()
           
 CassandraSpaceDataSourceConfigurer dynamicPropertyValueSerializer(PropertyValueSerializer dynamicPropertyValueSerializer)
          Optional.
 CassandraSpaceDataSourceConfigurer fixedPropertyValueSerializer(PropertyValueSerializer fixedPropertyValueSerializer)
          Optional.
 CassandraSpaceDataSourceConfigurer hectorClient(HectorCassandraClient hectorClient)
           
 CassandraSpaceDataSourceConfigurer maximumNumberOfConnections(int maximumNumberOfConnections)
          Optional.
 CassandraSpaceDataSourceConfigurer minimumNumberOfConnections(int minimumNumberOfConnections)
          Optional.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fixedPropertyValueSerializer

protected PropertyValueSerializer fixedPropertyValueSerializer

dynamicPropertyValueSerializer

protected PropertyValueSerializer dynamicPropertyValueSerializer

cassandraDataSource

protected CassandraDataSource cassandraDataSource

hectorClient

protected HectorCassandraClient hectorClient

minimumNumberOfConnections

protected int minimumNumberOfConnections

maximumNumberOfConnections

protected int maximumNumberOfConnections

batchLimit

protected int batchLimit
Constructor Detail

CassandraSpaceDataSourceConfigurer

public CassandraSpaceDataSourceConfigurer()
Method Detail

fixedPropertyValueSerializer

public CassandraSpaceDataSourceConfigurer fixedPropertyValueSerializer(PropertyValueSerializer fixedPropertyValueSerializer)
Optional. If set, all fixed properties with a type that is not primitive nor a common java type will be deserialized using PropertyValueSerializer.fromByteBuffer(java.nio.ByteBuffer) Note: This property must correspond to the property set on CassandraSpaceSynchronizationEndpoint. (default: Java object deserialization)

Parameters:
fixedPropertyValueSerializer - The PropertyValueSerializer to use.
Returns:
this instance.

dynamicPropertyValueSerializer

public CassandraSpaceDataSourceConfigurer dynamicPropertyValueSerializer(PropertyValueSerializer dynamicPropertyValueSerializer)
Optional. If set, all dynamic properties will be deserialized using PropertyValueSerializer.fromByteBuffer(java.nio.ByteBuffer). Note: This property must correspond to the property set on CassandraSpaceSynchronizationEndpoint. (default DynamicPropertyValueSerializer)

Parameters:
dynamicPropertyValueSerializer - the PropertyValueSerializer to use.
Returns:
this instance.

cassandraDataSource

public CassandraSpaceDataSourceConfigurer cassandraDataSource(CassandraDataSource cassandraDataSource)
Parameters:
cassandraDataSource - An instance of CassandraDataSource configured to use CQL version 2.0.0.
Returns:
this instance.

hectorClient

public CassandraSpaceDataSourceConfigurer hectorClient(HectorCassandraClient hectorClient)
Parameters:
hectorClient - an instance of HectorCassandraClient.
Returns:
this instance.

minimumNumberOfConnections

public CassandraSpaceDataSourceConfigurer minimumNumberOfConnections(int minimumNumberOfConnections)
Optional.

Parameters:
minimumNumberOfConnections - Minimum number of cassandra-jdbc connections to maintain in the connection pool. (default: 5)
Returns:
this instance.

maximumNumberOfConnections

public CassandraSpaceDataSourceConfigurer maximumNumberOfConnections(int maximumNumberOfConnections)
Optional.

Parameters:
maximumNumberOfConnections - Maximum number of cassandra-jdbc connections to maintain in the connection pool. (default: 30)
Returns:
this instance.

batchLimit

public CassandraSpaceDataSourceConfigurer batchLimit(int batchLimit)
Optional.

Parameters:
batchLimit - Maximum number of rows that will be transferred in batches. (default: 10000). e.g. If batchLimit is set to 10000 and a certain query result set size is 22000, then the query will be translated to 3 queries each with the CQL LIMIT argument set to 10000.
Returns:
this instance.

create

public CassandraSpaceDataSource create()
Returns:
An instance of CassandraSpaceDataSource matching this configurer configuration.

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.