public class SchemaManager extends Object implements AutoCloseable
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_REPLICATION_FACTOR |
| Constructor and Description |
|---|
SchemaManager(String keyspace,
String host,
int port,
String username,
String password,
boolean ssl) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
create(Schema schema) |
void |
create(Schema schema,
boolean ifNotExists) |
void |
create(Schema schema,
boolean ifNotExists,
boolean printOnly) |
int |
getReplicationFactor() |
void |
setReplicationFactor(int replicationFactor) |
public static final int DEFAULT_REPLICATION_FACTOR
@Inject
public SchemaManager(@Named(value="cassandra.keyspace")
String keyspace,
@Named(value="cassandra.host")
String host,
@Named(value="cassandra.port")
int port,
@Named(value="cassandra.username")
String username,
@Named(value="cassandra.password")
String password,
@Named(value="cassandra.ssl")
boolean ssl)
public void create(Schema schema) throws IOException
IOExceptionpublic void create(Schema schema, boolean ifNotExists) throws IOException
IOExceptionpublic void create(Schema schema, boolean ifNotExists, boolean printOnly) throws IOException
IOExceptionpublic void close()
close in interface AutoCloseablepublic int getReplicationFactor()
public void setReplicationFactor(int replicationFactor)
Copyright © 2021. All rights reserved.