public class DeltaObject extends QueryObject implements com.gemstone.gemfire.Delta
| Modifier and Type | Field and Description |
|---|---|
boolean |
aByteArrayChanged |
boolean |
aPrimitiveBooleanChanged |
boolean |
aPrimitiveByteChanged |
boolean |
aPrimitiveCharChanged |
boolean |
aPrimitiveDoubleChanged |
boolean |
aPrimitiveFloatChanged |
boolean |
aPrimitiveIntChanged |
boolean |
aPrimitiveLongChanged |
boolean |
aPrimitiveShortChanged |
boolean |
aStringChanged |
static boolean |
cloningEnabled |
aBoolean, aByte, aByteArray, aCharacter, aDouble, aFloat, aLong, anInteger, aPrimitiveBoolean, aPrimitiveByte, aPrimitiveChar, aPrimitiveDouble, aPrimitiveFloat, aPrimitiveInt, aPrimitiveLong, aPrimitiveShort, aQueryObject, aShort, aString, EQUAL_VALUES, extra, id, INCREMENT, myVersion, NEGATE, NULL_NONPRIM_FIELDS, RANDOM_VALUES, SEQUENTIAL_VALUES| Constructor and Description |
|---|
DeltaObject(long base,
int valueGeneration,
int byteArraySize,
int levels)
All the delta fields are initialized using the given base value
and valueGeneration to determine the values of each field.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
_fromDelta(DataInput in) |
protected void |
_toDelta(DataOutput out) |
Object |
clone()
Make a copy of the DeltaObject.
|
DeltaObject |
copy()
Make a copy of the DeltaObject.
|
void |
fromDelta(DataInput in)
Read in and set the changed fields
|
boolean |
hasDelta()
Return true if this object has changed a field, false otherwise
|
void |
modify(int changeValueGeneration,
int delta,
boolean log)
Modify the DeltaObject according to changeValueGeneration and delta.
|
void |
reset()
Reset the delta object to indicate no changes
|
void |
toDelta(DataOutput out)
Write out changed fields
|
compareTo, constantToString, depth, equals, fieldsToString, fillInBaseValues, getAtDepth, hasEqualId, hashCode, main, modify, modifyWithNewInstance, modifyWithNewInstance, toString, toString, toString, toStringAbbreviated, toStringAbbreviated, toStringAbbreviated, toStringFull, toStringFull, toStringFull, toStringOneLevelpublic static boolean cloningEnabled
public transient boolean aPrimitiveLongChanged
public transient boolean aPrimitiveIntChanged
public transient boolean aPrimitiveShortChanged
public transient boolean aPrimitiveFloatChanged
public transient boolean aPrimitiveDoubleChanged
public transient boolean aPrimitiveByteChanged
public transient boolean aPrimitiveCharChanged
public transient boolean aPrimitiveBooleanChanged
public transient boolean aByteArrayChanged
public transient boolean aStringChanged
public DeltaObject(long base,
int valueGeneration,
int byteArraySize,
int levels)
base - The base value for all fields. Fields are all set
to a value using base as appropriate. Unused if
valueGeneration is RANDOM_VALUES.valueGeneration - How to generate the values of the
fields. Can be one of
QueryObject.EQUAL_VALUES
QueryObject.SEQUENTIAL_VALUES
QueryObject.RANDOM_VALUESbyteArraySize - The size of byte[]. If < 0 then there is
no byteArray (it is null).levels - The number of levels of QueryObjects. 1 means
the field aQueryObject is null, 2 means aQueryObject
contains an instance of QueryObject with fields
initialized with base+1, the next level is initialized
with base+2 etc.public void toDelta(DataOutput out) throws IOException
toDelta in interface com.gemstone.gemfire.DeltaIOExceptionprotected void _toDelta(DataOutput out) throws IOException
IOExceptionpublic void fromDelta(DataInput in) throws IOException
fromDelta in interface com.gemstone.gemfire.DeltaIOExceptionprotected void _fromDelta(DataInput in) throws IOException
IOExceptionpublic boolean hasDelta()
hasDelta in interface com.gemstone.gemfire.Deltapublic void reset()
public Object clone() throws CloneNotSupportedException
clone in class QueryObjectCloneNotSupportedExceptionpublic DeltaObject copy()
public void modify(int changeValueGeneration,
int delta,
boolean log)
modify in class QueryObjectchangeValueGeneration - How to determine the new values
Can be one of:
QueryObject.INCREMENT
QueryObject.NEGATE
QueryObject.NULL_NONPRIM_FIELDS
If any fields are null and this is INCREMENT or NEGATE then
the field is filled in with a random value.delta - The number to increment or decrement; unused if
changeValueGeneration is QueryObject.NEGATE.log - If true, then log what is being modified, if false don't
log since output can be large.Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.