@Override public CassandraTemplate getObject() throws Exception { if (cqlOperations != null) { return new CassandraTemplate(cqlOperations, converter); } return new CassandraTemplate(sessionFactory, converter); }
@Bean public CassandraOperations cassandraTemplate() throws Exception { return new CassandraTemplate(session().getObject()); } }
@Bean @Primary public EventStore eventStore(Cluster cluster, ObjectMapper objectMapper) { return CassandraEventStore.create(new CassandraTemplate(cluster.connect(configuration.getKeyspace())), objectMapper); }
@Bean @Primary public EventStore eventStore(Cluster cluster, ObjectMapper objectMapper) { return CassandraEventStore.create(new CassandraTemplate(cluster.connect(configuration.getKeyspace())), objectMapper); }
@Bean @Primary public AggregateCatalogue aggregateCatalogue(Cluster cluster) { return CassandraAggregateCatalogue.create( new CassandraTemplate(cluster.connect(configuration.getKeyspace())), configuration.getCatalogueBucketCount()); }
@Bean @Primary public AggregateCatalogue aggregateCatalogue(Cluster cluster) { return CassandraAggregateCatalogue.create( new CassandraTemplate(cluster.connect(configuration.getKeyspace())), configuration.getCatalogueBucketCount()); }
@Bean public CassandraOperations cassandraTemplate(Cluster cluster) { return new CassandraTemplate(cluster.connect("zuul")); } }
@Before public void setUp() throws Exception { final Cluster cluster = Cluster.builder() .addContactPoints(InetAddress.getLoopbackAddress()) .withPort(9142) .build(); cassandraTemplate = new CassandraTemplate(cluster.connect("zuul")); instance = new CassandraZuulRouteStore(cassandraTemplate); }