GigaSpaces XAP 10.0.1 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  boolean augmentInitialLoadEntries
           
protected  int batchLimit
           
protected  CassandraDataSource cassandraDataSource
           
protected  ClusterInfo clusterInfo
           
protected  PropertyValueSerializer dynamicPropertyValueSerializer
           
protected  PropertyValueSerializer fixedPropertyValueSerializer
           
protected  HectorCassandraClient hectorClient
           
protected  String[] initialLoadQueryScanningBasePackages
           
protected  int maximumNumberOfConnections
           
protected  int minimumNumberOfConnections
           
 
Constructor Summary
CassandraSpaceDataSourceConfigurer()
           
 
Method Summary
 CassandraSpaceDataSourceConfigurer augmentInitialLoadEntries(boolean augmentInitialLoadEntries)
          optional.
 CassandraSpaceDataSourceConfigurer batchLimit(int batchLimit)
          Optional.
 CassandraSpaceDataSourceConfigurer cassandraDataSource(CassandraDataSource cassandraDataSource)
           
 CassandraSpaceDataSourceConfigurer clusterInfo(ClusterInfo clusterInfo)
          Injects the ClusterInfo to be used with the SpaceDataSource
 CassandraSpaceDataSource create()
           
 CassandraSpaceDataSourceConfigurer dynamicPropertyValueSerializer(PropertyValueSerializer dynamicPropertyValueSerializer)
          Optional.
 CassandraSpaceDataSourceConfigurer fixedPropertyValueSerializer(PropertyValueSerializer fixedPropertyValueSerializer)
          Optional.
 CassandraSpaceDataSourceConfigurer hectorClient(HectorCassandraClient hectorClient)
           
 CassandraSpaceDataSourceConfigurer initialLoadQueryScanningBasePackages(String[] initialLoadQueryScanningBasePackages)
          optional.
 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

initialLoadQueryScanningBasePackages

protected String[] initialLoadQueryScanningBasePackages

augmentInitialLoadEntries

protected boolean augmentInitialLoadEntries

clusterInfo

protected ClusterInfo clusterInfo
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.

initialLoadQueryScanningBasePackages

public CassandraSpaceDataSourceConfigurer initialLoadQueryScanningBasePackages(String[] initialLoadQueryScanningBasePackages)
optional.

Parameters:
initialLoadQueryScanningBasePackages - array of base packages to scan for custom initial load query methods marked with the SpaceInitialLoadQuery annotation (default: null, scans nothing).
Returns:
this instance.

clusterInfo

public CassandraSpaceDataSourceConfigurer clusterInfo(ClusterInfo clusterInfo)
Injects the ClusterInfo to be used with the SpaceDataSource


augmentInitialLoadEntries

public CassandraSpaceDataSourceConfigurer augmentInitialLoadEntries(boolean augmentInitialLoadEntries)
optional.

Parameters:
augmentInitialLoadEntries - feature switch for initial load entry augmentation with partition-specific query (default: true).
Returns:
this instance.

create

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

GigaSpaces XAP 10.0.1 API

Copyright © GigaSpaces.