Batch (apache-cassandra API)
Date: 2018-02-14

org.apache.cassandra.batchlog

## Class Batch

- java.lang.Object
- - org.apache.cassandra.batchlog.Batch

-     public final class Batch
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `long` | `creationTime`
    `java.util.UUID` | `id`
    `static org.apache.cassandra.batchlog.Batch.Serializer` | `serializer`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Batch` | `createLocal(java.util.UUID id, long creationTime, java.util.Collection<Mutation> mutations)` Creates a 'local' batch - with all enclosed mutations in decoded form (as Mutation instances)
    `static Batch` | `createRemote(java.util.UUID id, long creationTime, java.util.Collection<java.nio.ByteBuffer> mutations)` Creates a 'remote' batch - with all enclosed mutations in encoded form (as ByteBuffer instances) The mutations will always be encoded using the current messaging version.
    `int` | `size()` Count of the mutations in the batch.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### serializer

          public static final org.apache.cassandra.batchlog.Batch.Serializer serializer

    - #### id

          public final java.util.UUID id

    - #### creationTime

          public final long creationTime

  - ### Method Detail

    - #### createLocal

          public static Batch createLocal(java.util.UUID id,
                                          long creationTime,
                                          java.util.Collection<Mutation> mutations)

      Creates a 'local' batch - with all enclosed mutations in decoded form (as Mutation instances)

    - #### createRemote

          public static Batch createRemote(java.util.UUID id,
                                           long creationTime,
                                           java.util.Collection<java.nio.ByteBuffer> mutations)

      Creates a 'remote' batch - with all enclosed mutations in encoded form (as ByteBuffer instances) The mutations will always be encoded using the current messaging version.

    - #### size

          public int size()

      Count of the mutations in the batch.

Copyright © 2018 The Apache Software Foundation