public class CassandraSessionImpl extends Object implements CassandraSession
CassandraSession
.Constructor and Description |
---|
CassandraSessionImpl(com.datastax.driver.core.Cluster.Builder builder,
Integer fetchSize,
com.datastax.driver.core.ConsistencyLevel readConsistency,
com.datastax.driver.core.ConsistencyLevel writeConsistency,
long expirationTimeout,
IgniteLogger log)
Creates instance of Cassandra driver session wrapper.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
<R,V> R |
execute(BatchExecutionAssistant<R,V> assistant,
Iterable<? extends V> data)
Executes batch asynchronous operation against Cassandra database.
|
void |
execute(BatchLoaderAssistant assistant)
Executes batch asynchronous operation to load bunch of records
specified by CQL statement from Cassandra database
|
<V> V |
execute(ExecutionAssistant<V> assistant)
Execute single synchronous operation against Cassandra database.
|
void |
execute(List<Mutation> mutations)
Executes all the mutations performed withing Ignite transaction against Cassandra database.
|
public CassandraSessionImpl(com.datastax.driver.core.Cluster.Builder builder, Integer fetchSize, com.datastax.driver.core.ConsistencyLevel readConsistency, com.datastax.driver.core.ConsistencyLevel writeConsistency, long expirationTimeout, IgniteLogger log)
builder
- Builder for Cassandra cluster.fetchSize
- Number of rows to immediately fetch in CQL statement execution.readConsistency
- Consistency level for Cassandra READ operations (select).writeConsistency
- Consistency level for Cassandra WRITE operations (insert/update/delete).log
- Logger.public <V> V execute(ExecutionAssistant<V> assistant)
execute
in interface CassandraSession
V
- type of the result returned from operation.assistant
- execution assistance to perform the main operation logic.public <R,V> R execute(BatchExecutionAssistant<R,V> assistant, Iterable<? extends V> data)
execute
in interface CassandraSession
R
- type of the result returned from batch operation.V
- type of the value used in batch operation.assistant
- execution assistance to perform the main operation logic.data
- data which should be processed in batch operation.public void execute(BatchLoaderAssistant assistant)
execute
in interface CassandraSession
assistant
- execution assistance to perform the main operation logic.public void execute(List<Mutation> mutations)
execute
in interface CassandraSession
mutations
- Mutations.public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
GridGain In-Memory Computing Platform : ver. 8.9.14 Release Date : November 5 2024