Example usage for org.springframework.data.cassandra.core.cql.keyspace CreateKeyspaceSpecification createKeyspace

List of usage examples for org.springframework.data.cassandra.core.cql.keyspace CreateKeyspaceSpecification createKeyspace

Introduction

In this page you can find the example usage for org.springframework.data.cassandra.core.cql.keyspace CreateKeyspaceSpecification createKeyspace.

Prototype

public static CreateKeyspaceSpecification createKeyspace(KeyspaceIdentifier name) 

Source Link

Document

Entry point into the CreateKeyspaceSpecification 's fluent API given name to create a keyspace.

Usage

From source file:com.example.CassandraConfiguration.java

@Override
protected List<CreateKeyspaceSpecification> getKeyspaceCreations() {
    final CreateKeyspaceSpecification specification = CreateKeyspaceSpecification
            .createKeyspace(CassandraConfiguration.KEY_SPACE_NAME).ifNotExists()
            .with(KeyspaceOption.DURABLE_WRITES, true);
    return Collections.singletonList(specification);
}