public class Session extends Object
| Constructor and Description |
|---|
Session(com.datastax.driver.core.Session wrappedSession,
String keyspaceName,
com.datastax.driver.core.ConsistencyLevel writeConsistencyLevel,
int maxConcurrentQueries) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
createTableWithLCS(String createTableQuery) |
void |
createTableWithLCS(String createTableQuery,
boolean useAndInsteadOfWith) |
void |
createTableWithSTCS(String createTableQuery) |
void |
createTableWithTWCS(String createTableQuery,
int expirationHours) |
void |
createTableWithTWCS(String createTableQuery,
int expirationHours,
boolean useAndInsteadOfWith) |
void |
createTableWithTWCS(String createTableQuery,
int expirationHours,
boolean useAndInsteadOfWith,
boolean fallbackToSTCS) |
Collection<String> |
getAllTableNames() |
CassandraWriteMetrics |
getCassandraWriteMetrics() |
com.datastax.driver.core.Cluster |
getCluster() |
static int |
getCompactionWindowSizeHours(int expirationHours) |
String |
getKeyspaceName() |
com.datastax.driver.core.TableMetadata |
getTable(String name) |
Collection<com.datastax.driver.core.TableMetadata> |
getTables() |
static boolean |
isInRollupThread() |
com.datastax.driver.core.PreparedStatement |
prepare(String query) |
com.datastax.driver.core.ResultSet |
read(com.datastax.driver.core.Statement statement) |
com.datastax.driver.core.ResultSet |
read(String query) |
com.google.common.util.concurrent.ListenableFuture<com.datastax.driver.core.ResultSet> |
readAsync(com.datastax.driver.core.Statement statement) |
com.google.common.util.concurrent.ListenableFuture<com.datastax.driver.core.ResultSet> |
readAsyncFailIfNoRows(com.datastax.driver.core.Statement statement,
String errorMessage) |
com.google.common.util.concurrent.ListenableFuture<com.datastax.driver.core.ResultSet> |
readAsyncWarnIfNoRows(com.datastax.driver.core.Statement statement,
String warningMessage,
Object... warningArguments) |
static void |
setInRollupThread(boolean value) |
com.datastax.driver.core.ResultSet |
update(com.datastax.driver.core.Statement statement) |
void |
updateSchemaWithRetry(String query) |
void |
updateTableTwcsProperties(String tableName,
int expirationHours) |
void |
updateTableTwcsProperties(String tableName,
String compactionWindowUnit,
int compactionWindowSize) |
void |
write(com.datastax.driver.core.Statement statement) |
com.google.common.util.concurrent.ListenableFuture<?> |
writeAsync(com.datastax.driver.core.Statement statement) |
public void createTableWithLCS(String createTableQuery) throws InterruptedException
InterruptedExceptionpublic void createTableWithLCS(String createTableQuery, boolean useAndInsteadOfWith) throws InterruptedException
InterruptedExceptionpublic void createTableWithSTCS(String createTableQuery) throws InterruptedException
InterruptedExceptionpublic void createTableWithTWCS(String createTableQuery, int expirationHours) throws InterruptedException
InterruptedExceptionpublic void createTableWithTWCS(String createTableQuery, int expirationHours, boolean useAndInsteadOfWith) throws InterruptedException
InterruptedExceptionpublic void createTableWithTWCS(String createTableQuery, int expirationHours, boolean useAndInsteadOfWith, boolean fallbackToSTCS) throws InterruptedException
InterruptedExceptionpublic Collection<String> getAllTableNames()
public CassandraWriteMetrics getCassandraWriteMetrics()
public com.datastax.driver.core.Cluster getCluster()
public static int getCompactionWindowSizeHours(int expirationHours)
public String getKeyspaceName()
public com.datastax.driver.core.TableMetadata getTable(String name)
public Collection<com.datastax.driver.core.TableMetadata> getTables()
public static boolean isInRollupThread()
public com.datastax.driver.core.PreparedStatement prepare(String query)
public com.datastax.driver.core.ResultSet read(com.datastax.driver.core.Statement statement)
throws Exception
Exceptionpublic com.datastax.driver.core.ResultSet read(String query) throws Exception
Exceptionpublic com.google.common.util.concurrent.ListenableFuture<com.datastax.driver.core.ResultSet> readAsync(com.datastax.driver.core.Statement statement)
throws Exception
Exceptionpublic com.google.common.util.concurrent.ListenableFuture<com.datastax.driver.core.ResultSet> readAsyncFailIfNoRows(com.datastax.driver.core.Statement statement,
String errorMessage)
throws Exception
Exceptionpublic com.google.common.util.concurrent.ListenableFuture<com.datastax.driver.core.ResultSet> readAsyncWarnIfNoRows(com.datastax.driver.core.Statement statement,
String warningMessage,
Object... warningArguments)
throws Exception
Exceptionpublic static void setInRollupThread(boolean value)
public com.datastax.driver.core.ResultSet update(com.datastax.driver.core.Statement statement)
throws Exception
Exceptionpublic void updateSchemaWithRetry(String query) throws InterruptedException
InterruptedExceptionpublic void updateTableTwcsProperties(String tableName, int expirationHours) throws InterruptedException
InterruptedExceptionpublic void updateTableTwcsProperties(String tableName, String compactionWindowUnit, int compactionWindowSize) throws InterruptedException
InterruptedExceptionpublic void write(com.datastax.driver.core.Statement statement)
throws Exception
ExceptionCopyright © 2011–2019 Glowroot contributors. All rights reserved.