クラス AbstractCassandraConfiguration
java.lang.ObjectSE
org.springframework.data.cassandra.config.AbstractSessionConfiguration
org.springframework.data.cassandra.config.AbstractCassandraConfiguration
- 実装済みのインターフェース一覧:
Aware, BeanClassLoaderAware, BeanFactoryAware
- 既知の直属サブクラス
AbstractReactiveCassandraConfiguration
@Configuration
public abstract class AbstractCassandraConfiguration
extends AbstractSessionConfiguration
implements BeanClassLoaderAware
JavaConfig を使用した Spring Data Cassandra 構成の基本クラス。
- 作成者:
- Alex Shvid, Matthew T. Adams, John Blum, Mark Paluch, Ammar Khaku
コンストラクター概要
コンストラクター方法の概要
修飾子と型メソッド説明設定されたcassandraMappingContext(CassandraManagedTypes)を使用してCassandraConverterを作成します。初期エンティティセットを保持する指定されたCassandraManagedTypesオブジェクトを返します。cassandraMappingContext(CassandraManagedTypes cassandraManagedTypes) エンティティをJava ObjectsSE にマップするためにMappingContextインスタンスを返します。cassandraSessionFactory(com.datastax.oss.driver.api.core.CqlSession cqlSession) SessionFactoryを提供するSessionFactoryFactoryBeanを作成します。CassandraAdminTemplateを作成します。必要に応じて、ConverterをCustomConversionsオブジェクトに登録します。protected OptionalSE<ClassLoaderSE> Cassandra アプリケーションエンティティtypesSE を解決するために使用される構成済みの JavaClassLoaderSE を返します。StringSE[]Tableアノテーションが付けられたエンティティをスキャンするための基本パッケージ。初期エンティティクラスのSetSE を返します。protected SessionFactory初期化されたCqlSessionインスタンスを返します。アプリケーションの起動時に実行するSchemaAction。protected @Nullable KeyspacePopulatorキースペースをクリーンアップするためにKeyspacePopulatorを作成します。protected @Nullable KeyspacePopulatorキースペースを初期化するためにKeyspacePopulatorを作成します。protected ByteArrayResourcecontentを指定して、新しいByteArrayResourceを作成します。voidsetBeanClassLoader(@Nullable ClassLoaderSE classLoader) Cassandra アプリケーションエンティティtypesSE を解決するために使用される JavaClassLoaderSE を構成します。protected UserTypeResolveruserTypeResolver(com.datastax.oss.driver.api.core.CqlSession cqlSession) 指定されたCqlSessionから新しいUserTypeResolverを作成します。クラス AbstractSessionConfiguration から継承されたメソッド
cassandraSession, cqlTemplate, getBeanFactory, getCompressionType, getContactPoints, getDriverConfigLoaderBuilderConfigurer, getDriverConfigurationResource, getKeyspaceCreations, getKeyspaceDrops, getKeyspaceName, getLocalDataCenter, getPort, getRequiredSession, getSessionBuilderConfigurer, getSessionName, requireBeanOfType, setBeanFactory
コンストラクターの詳細
AbstractCassandraConfiguration
public AbstractCassandraConfiguration()
方法の詳細
cassandraConverter
設定されたcassandraMappingContext(CassandraManagedTypes)を使用してCassandraConverterを作成します。指定されたすべてのcustomConversions()が適用されます。- 戻り値:
CassandraConverterは、マッピングプロセス中に Java と Cassandra の値型を変換するために使用されます。- 関連事項:
cassandraManagedTypes
初期エンティティセットを保持する指定されたCassandraManagedTypesオブジェクトを返します。- 戻り値:
CassandraManagedTypesの新しいインスタンス。- 例外:
ClassNotFoundExceptionSE- 導入:
- 4.0
cassandraMappingContext
@Bean public CassandraMappingContext cassandraMappingContext(CassandraManagedTypes cassandraManagedTypes) エンティティをJava ObjectsSE にマップするためにMappingContextインスタンスを返します。- 関連事項:
cassandraSessionFactory
@Bean public SessionFactoryFactoryBean cassandraSessionFactory(com.datastax.oss.driver.api.core.CqlSession cqlSession) SessionFactoryを提供するSessionFactoryFactoryBeanを作成します。SessionFactoryFactoryBeanのライフサイクルは、configured keyspace内のschemaを初期化します。- 戻り値:
SessionFactoryFactoryBean- 関連事項:
cassandraTemplate
CassandraAdminTemplateを作成します。customConversions
必要に応じて、カスタムConverterをCustomConversionsオブジェクトに登録します。これらのCustomConversionsは、cassandraConverter()およびcassandraMappingContext(CassandraManagedTypes)に登録されます。デフォルトでは、空のCustomConversionsインスタンスを返します。- 戻り値:
- null であってはなりません。
- 導入:
- 1.5
setBeanClassLoader
Cassandra アプリケーションエンティティtypesSE を解決するために使用される JavaClassLoaderSE を構成します。- 次で指定:
- インターフェース
BeanClassLoaderAware内のsetBeanClassLoader - パラメーター:
classLoader- Cassandra アプリケーションエンティティtypesSE を解決するために使用される JavaClassLoaderSE。null の場合もあります。- 関連事項:
getBeanClassLoader
Cassandra アプリケーションエンティティtypesSE を解決するために使用される構成済みの JavaClassLoaderSE を返します。- 戻り値:
- Cassandra アプリケーションエンティティ
typesSE を解決するために使用される JavaClassLoaderSE。 - 関連事項:
getEntityBasePackages
getInitialEntitySet
初期エンティティクラスのSetSE を返します。デフォルトでは、getEntityBasePackages()を使用してクラスパスをスキャンします。サブクラスによってオーバーライドして、クラスパスのスキャンをスキップし、エンティティクラスの固定セットを返すことができます。- 戻り値:
- 初期エンティティクラスの
SetSE。 - 例外:
ClassNotFoundExceptionSE- エンティティスキャンが失敗した場合。- 導入:
- 2.0
- 関連事項:
getRequiredSessionFactory
初期化されたCqlSessionインスタンスを返します。- オーバーライド:
- クラス
AbstractSessionConfigurationのgetRequiredSessionFactory - 戻り値:
CqlSession- 例外:
IllegalStateExceptionSE- セッションファクトリが初期化されていない場合。
getSchemaAction
アプリケーションの起動時に実行するSchemaAction。デフォルトはSchemaAction.NONEです。- 関連事項:
keyspaceCleaner
キースペースをクリーンアップするためにKeyspacePopulatorを作成します。- 戻り値:
- 何も構成されていない場合は
KeyspacePopulatorまたはnull。 - 関連事項:
keyspacePopulator
キースペースを初期化するためにKeyspacePopulatorを作成します。- 戻り値:
- 何も構成されていない場合は
KeyspacePopulatorまたはnull。 - 関連事項:
scriptOf
contentを指定して、新しいByteArrayResourceを作成します。- パラメーター:
content- スクリプトの内容。- 戻り値:
content用の新しいByteArrayResource。- 導入:
- 3.0
userTypeResolver
- パラメーター:
cqlSession- CassandraCqlSessionを使用します。- 戻り値:
- 新しい
SimpleUserTypeResolver。 - 導入:
- 3.4.3