/** * Returns the initialized {@link Cluster} instance. * * @return the {@link Cluster}. * @throws IllegalStateException if the cluster factory is not initialized. */ protected Cluster getRequiredCluster() { CassandraClusterFactoryBean factoryBean = cluster(); Assert.state(factoryBean.getObject() != null, "Cluster factory not initialized"); return factoryBean.getObject(); }
bean.setAddressTranslator(getAddressTranslator()); bean.setAuthProvider(getAuthProvider()); bean.setClusterBuilderConfigurer(getClusterBuilderConfigurer()); bean.setClusterName(getClusterName()); bean.setCompressionType(getCompressionType()); bean.setContactPoints(getContactPoints()); bean.setLoadBalancingPolicy(getLoadBalancingPolicy()); bean.setMaxSchemaAgreementWaitSeconds(getMaxSchemaAgreementWaitSeconds()); bean.setMetricsEnabled(getMetricsEnabled()); bean.setNettyOptions(getNettyOptions()); bean.setPoolingOptions(getPoolingOptions()); bean.setPort(getPort()); bean.setProtocolVersion(getProtocolVersion()); bean.setQueryOptions(getQueryOptions()); bean.setReconnectionPolicy(getReconnectionPolicy()); bean.setRetryPolicy(getRetryPolicy()); bean.setSpeculativeExecutionPolicy(getSpeculativeExecutionPolicy()); bean.setSocketOptions(getSocketOptions()); bean.setTimestampGenerator(getTimestampGenerator()); bean.setKeyspaceCreations(getKeyspaceCreations()); bean.setKeyspaceDrops(getKeyspaceDrops()); bean.setStartupScripts(getStartupScripts()); bean.setShutdownScripts(getShutdownScripts());