public class PdxObject extends Object implements objects.ConfigurableObject, TimestampedObject, UpdatableObject, com.gemstone.gemfire.cache.util.ObjectSizer
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
byteArray |
protected int |
field1 |
protected char |
field2 |
protected long |
timestamp |
| Constructor and Description |
|---|
PdxObject() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o)
Two
PdxObjects are considered to be equal if they have
the same values for field1, field2 and timestamp. |
int |
getIndex()
Returns the index encoded in the PdxObject's byte array.
|
long |
getTimestamp()
Returns the object creation timestamp encoded in the object.
|
void |
incrementField1() |
void |
init(int index)
Initializes a PdxObject.
|
void |
resetTimestamp()
Resets the timestamp encoded in the object to the current time.
|
int |
sizeof(Object o) |
String |
toString() |
void |
update()
Updates one or more object fields.
|
void |
validate(int index)
Validates that the given index is encoded in the PdxObject's
byte array.
|
protected long timestamp
protected int field1
protected char field2
protected byte[] byteArray
public void init(int index)
init in interface objects.ConfigurableObjectindex - the value to encode into the PdxObject.ObjectCreationException - index cannot be encodedpublic int getIndex()
getIndex in interface objects.ConfigurableObjectObjectAccessExceptionpublic void validate(int index)
validate in interface objects.ConfigurableObjectindex - the expected encoded valueObjectValidationException - If index is not encoded in bytespublic void incrementField1()
public void update()
UpdatableObjectupdate in interface UpdatableObjectpublic long getTimestamp()
TimestampedObjectgetTimestamp in interface TimestampedObjectpublic void resetTimestamp()
TimestampedObjectresetTimestamp in interface TimestampedObjectpublic boolean equals(Object o)
PdxObjects are considered to be equal if they have
the same values for field1, field2 and timestamp.
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.ObjectSizerCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.