public class BatchObject extends Object implements objects.ConfigurableObject, TimestampedObject, com.gemstone.gemfire.cache.util.ObjectSizer, com.gemstone.gemfire.DataSerializable
BatchStringPrms.batchSize instances are in batch 0, the second
are in batch 1, etc., and a byte array of size BatchObjectPrms.size.| Constructor and Description |
|---|
BatchObject() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o)
Two
BatchObjects are considered to be equal if they have
the same values for index, timestamp, and batch. |
void |
fromData(DataInput in) |
int |
getBatch()
Returns the batch.
|
int |
getIndex()
Returns the index.
|
long |
getTimestamp()
Returns the object creation timestamp encoded in the object.
|
void |
init(int anIndex)
Initializes a BatchObject.
|
void |
resetTimestamp()
Resets the timestamp encoded in the object to the current time.
|
int |
sizeof(Object o) |
void |
toData(DataOutput out) |
String |
toString() |
void |
validate(int anIndex)
Validates that the given index is encoded in the BatchObject.
|
public void init(int anIndex)
init in interface objects.ConfigurableObjectindex - the value to encode into the BatchObject.ObjectCreationException - index cannot be encodedpublic int getIndex()
getIndex in interface objects.ConfigurableObjectpublic int getBatch()
public void validate(int anIndex)
validate in interface objects.ConfigurableObjectanIndex - the expected encoded valueObjectValidationException - If index is not the same as indexpublic long getTimestamp()
TimestampedObjectgetTimestamp in interface TimestampedObjectpublic void resetTimestamp()
TimestampedObjectresetTimestamp in interface TimestampedObjectpublic boolean equals(Object o)
BatchObjects are considered to be equal if they have
the same values for index, timestamp, and batch.
This provides stronger validation than the validate(int)
method that only considers the index.public int sizeof(Object o)
sizeof in interface com.gemstone.gemfire.cache.util.ObjectSizerpublic void toData(DataOutput out) throws IOException
toData in interface com.gemstone.gemfire.DataSerializableIOExceptionpublic void fromData(DataInput in) throws IOException, ClassNotFoundException
fromData in interface com.gemstone.gemfire.DataSerializableIOExceptionClassNotFoundExceptionCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.