public final class Batch
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Batch.Serializer |
Modifier and Type | Field and Description |
---|---|
long |
creationTime |
java.util.UUID |
id |
static Batch.Serializer |
serializer |
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.
|
java.util.Collection<java.nio.ByteBuffer> |
getEncodedMutations() |
boolean |
isLocal()
Local batches contain only already decoded
Mutation instances. |
int |
size()
Count of the mutations in the batch.
|
public static final Batch.Serializer serializer
public final java.util.UUID id
public final long creationTime
public static Batch createLocal(java.util.UUID id, long creationTime, java.util.Collection<Mutation> mutations)
public static Batch createRemote(java.util.UUID id, long creationTime, java.util.Collection<java.nio.ByteBuffer> mutations)
public int size()
public java.util.Collection<java.nio.ByteBuffer> getEncodedMutations()
public boolean isLocal()
Mutation
instances. Unlike remote
batches, which contain mutations encoded as ByteBuffer
instances, local batches
can be serialized and sent over the wire.true
if there are no encoded mutations present, and false
otherwiseCopyright © 2009- The Apache Software Foundation