Class: CassandraModel::BatchReactor
- Inherits:
-
BatchReactor::ReactorCluster
- Object
- BatchReactor::ReactorCluster
- CassandraModel::BatchReactor
- Defined in:
- lib/cassandra_model/batch_reactor.rb,
lib/cassandra_model/batch_reactor/future.rb
Defined Under Namespace
Classes: Future
Instance Method Summary collapse
-
#initialize(cluster, session, batch_klass, options) ⇒ BatchReactor
constructor
A new instance of BatchReactor.
- #perform_within_batch(statement) ⇒ Object
Constructor Details
#initialize(cluster, session, batch_klass, options) ⇒ BatchReactor
Returns a new instance of BatchReactor.
4 5 6 7 8 9 10 11 |
# File 'lib/cassandra_model/batch_reactor.rb', line 4 def initialize(cluster, session, batch_klass, ) @cluster = cluster @session = session @batch_klass = batch_klass define_partitioner(&method(:partition)) super(cluster.hosts.count, , &method(:batch_callback)) end |