GigaSpaces XAP 10.0.1 API

org.openspaces.persistency.cassandra
Class CassandraSpaceDataSourceFactoryBean

java.lang.Object
  extended by org.openspaces.persistency.cassandra.CassandraSpaceDataSourceFactoryBean
All Implemented Interfaces:
ClusterInfoAware, DisposableBean, FactoryBean<CassandraSpaceDataSource>, InitializingBean

public class CassandraSpaceDataSourceFactoryBean
extends Object
implements FactoryBean<CassandraSpaceDataSource>, InitializingBean, DisposableBean, ClusterInfoAware

A FactoryBean for creating a singleton instance of CassandraSpaceDataSource.

Since:
9.1.1
Author:
Dan Kilman

Constructor Summary
CassandraSpaceDataSourceFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
           
 void augmentInitialLoadEntries(boolean augmentInitialLoadEntries)
           
 void destroy()
           
protected  CassandraSpaceDataSourceConfigurer getConfigurer()
           
 CassandraSpaceDataSource getObject()
           
 Class<?> getObjectType()
           
 boolean isSingleton()
           
 void setBatchLimit(int batchLimit)
           
 void setCassandraDataSource(CassandraDataSource cassandraDataSource)
           
 void setClusterInfo(ClusterInfo clusterInfo)
          Sets the cluster information.
 void setDynamicPropertyValueSerializer(PropertyValueSerializer dynamicPropertyValueSerializer)
           
 void setFixedPropertyValueSerializer(PropertyValueSerializer fixedPropertyValueSerializer)
           
 void setHectorClient(HectorCassandraClient hectorClient)
           
 void setInitialLoadQueryScanningBasePackages(String... initialLoadQueryScanningBasePackages)
           
 void setMaximumNumberOfConnections(int maximumNumberOfConnections)
           
 void setMinimumNumberOfConnections(int minimumNumberOfConnections)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CassandraSpaceDataSourceFactoryBean

public CassandraSpaceDataSourceFactoryBean()
Method Detail

getConfigurer

protected CassandraSpaceDataSourceConfigurer getConfigurer()

setFixedPropertyValueSerializer

public void setFixedPropertyValueSerializer(PropertyValueSerializer fixedPropertyValueSerializer)
See Also:
CassandraSpaceDataSourceConfigurer.fixedPropertyValueSerializer(PropertyValueSerializer)

setDynamicPropertyValueSerializer

public void setDynamicPropertyValueSerializer(PropertyValueSerializer dynamicPropertyValueSerializer)
See Also:
CassandraSpaceDataSourceConfigurer.dynamicPropertyValueSerializer(PropertyValueSerializer)

setCassandraDataSource

public void setCassandraDataSource(CassandraDataSource cassandraDataSource)
See Also:
CassandraSpaceDataSourceConfigurer.cassandraDataSource(CassandraDataSource)

setHectorClient

public void setHectorClient(HectorCassandraClient hectorClient)
See Also:
CassandraSpaceDataSourceConfigurer.cassandraDataSource(CassandraDataSource)

setMinimumNumberOfConnections

public void setMinimumNumberOfConnections(int minimumNumberOfConnections)
See Also:
CassandraSpaceDataSourceConfigurer.minimumNumberOfConnections(int)

setMaximumNumberOfConnections

public void setMaximumNumberOfConnections(int maximumNumberOfConnections)
See Also:
CassandraSpaceDataSourceConfigurer.maximumNumberOfConnections(int)

setBatchLimit

public void setBatchLimit(int batchLimit)
See Also:
CassandraSpaceDataSourceConfigurer.batchLimit(int)

setInitialLoadQueryScanningBasePackages

public void setInitialLoadQueryScanningBasePackages(String... initialLoadQueryScanningBasePackages)
See Also:
CassandraSpaceDataSourceConfigurer.initialLoadQueryScanningBasePackages(String[])

setClusterInfo

public void setClusterInfo(ClusterInfo clusterInfo)
Description copied from interface: ClusterInfoAware
Sets the cluster information.

Note, the cluster information is obtained externally from the application context which means that this feature need to be supported by specific containers (and is not supported by plain Spring application context). This means that beans that implement ClusterInfoAware should take into account the fact that the cluster info provided might be null.

Specified by:
setClusterInfo in interface ClusterInfoAware
Parameters:
clusterInfo - The cluster information to be injected
See Also:
CassandraSpaceDataSourceConfigurer.clusterInfo(org.openspaces.core.cluster.ClusterInfo)

augmentInitialLoadEntries

public void augmentInitialLoadEntries(boolean augmentInitialLoadEntries)
See Also:
CassandraSpaceDataSourceConfigurer.augmentInitialLoadEntries(boolean)

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
Exception

getObject

public CassandraSpaceDataSource getObject()
                                   throws Exception
Specified by:
getObject in interface FactoryBean<CassandraSpaceDataSource>
Throws:
Exception

getObjectType

public Class<?> getObjectType()
Specified by:
getObjectType in interface FactoryBean<CassandraSpaceDataSource>

isSingleton

public boolean isSingleton()
Specified by:
isSingleton in interface FactoryBean<CassandraSpaceDataSource>

destroy

public void destroy()
             throws Exception
Specified by:
destroy in interface DisposableBean
Throws:
Exception

GigaSpaces XAP 10.0.1 API

Copyright © GigaSpaces.