public interface CassandraGateway
Modifier and Type | Method and Description |
---|---|
void |
deleteColumn(java.lang.String rowKey,
java.lang.String column)
Deletes a column from a row in Cassandra.
|
void |
deleteRow(java.lang.String rowKey)
Deletes a row in Cassandra.
|
java.lang.String |
getColumnFamily()
Return the column family that this gateway provides access to.
|
com.netflix.astyanax.model.ColumnList<java.lang.String> |
getColumns(java.lang.String rowKey,
java.lang.String... columns)
Gets specific columns from a specific row
|
com.netflix.astyanax.Keyspace |
getKeyspace()
Return the keyspace that this gateway provides access to.
|
com.netflix.astyanax.model.ColumnList<java.lang.String> |
getRow(java.lang.String rowKey)
Gets all columns for the specified row.
|
com.netflix.astyanax.model.Rows<java.lang.String,java.lang.String> |
getRows(java.lang.String... rowKeys)
Gets all columns for all the listed row keys.
|
com.netflix.astyanax.model.Rows<java.lang.String,java.lang.String> |
select(java.lang.String cql)
Performs a CQL query and returns result.
|
java.util.concurrent.Future<com.netflix.astyanax.model.Rows<java.lang.String,java.lang.String>> |
selectAsync(java.lang.String cql)
Performs a CQL query asynchronously
|
void |
upsert(java.lang.String rowKey,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Performs an insert/update for a row in Cassandra.
|
void |
upsert(java.lang.String rowKey,
java.util.Map<java.lang.String,java.lang.Object> attributes,
int ttlSeconds)
Performs an insert/update for a row in Cassandra.
|
com.netflix.astyanax.Keyspace getKeyspace()
java.lang.String getColumnFamily()
void upsert(java.lang.String rowKey, java.util.Map<java.lang.String,java.lang.Object> attributes)
rowKey
- the row key to use for insertions.attributes
- map of column names to column values.void upsert(java.lang.String rowKey, java.util.Map<java.lang.String,java.lang.Object> attributes, int ttlSeconds)
rowKey
- the row key to use for insertionsattributes
- map of column names to column values.ttlSeconds
- how long should columns in this upsert live.void deleteRow(java.lang.String rowKey)
rowKey
- the key of the row to delete.void deleteColumn(java.lang.String rowKey, java.lang.String column)
rowKey
- the key of the row containing the column.column
- the name of the column to delete.com.netflix.astyanax.model.ColumnList<java.lang.String> getColumns(java.lang.String rowKey, java.lang.String... columns)
rowKey
- the specific row's key.columns
- the specific columnscom.netflix.astyanax.model.ColumnList<java.lang.String> getRow(java.lang.String rowKey)
rowKey
- a single row key.com.netflix.astyanax.model.Rows<java.lang.String,java.lang.String> getRows(java.lang.String... rowKeys)
rowKeys
- a list of row keys.com.netflix.astyanax.model.Rows<java.lang.String,java.lang.String> select(java.lang.String cql)
cql
- the CQL query string.java.util.concurrent.Future<com.netflix.astyanax.model.Rows<java.lang.String,java.lang.String>> selectAsync(java.lang.String cql)
cql
- the CQL query string.