Uploaded image for project: 'Spring Data for Apache Cassandra'
  1. Spring Data for Apache Cassandra
  2. DATACASS-288

Add support for Cassandra batch operations

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: 1.5 M1 (Ingalls)
    • Component/s: Core
    • Labels:
      None

      Description

      CassandraTemplate DML operations affecting multiple rows (e.g. insert(List<T> entities)) use Cassandra batches without the possibility of issuing just multiple inserts/updates/deletes. Batches should get a dedicated interface to execute and give control to the caller. So the caller can decide whether to use batches and which type of batch to use. The API should omit UNLOGGED batches as unlogged batches are deprecated with Cassandra 3.0.

      Switching CassandraTemplate from batch operations to issuing multiple commands is not part of this ticket.

      interface CassandraBatchOperations {
      
        void execute();
      
        CassandraBatchOperations <T> insert(T entity);
        CassandraBatchOperations <T> insert(Iterable<T> entities);
      
        CassandraBatchOperations <T> update(T entity);
        CassandraBatchOperations <T> update(Iterable<T> entities);
      
        CassandraBatchOperations <T> delete(T entity);
        CassandraBatchOperations <T> delete(Iterable<T> entities);
      }
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mp911de Mark Paluch
              Reporter:
              mp911de Mark Paluch
              Last updater:
              Spring Issues Spring Issues
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 21 weeks, 1 day ago