VMware GemFire Native C++ Reference
9.1
|
A PdxWriter will be passed to PdxSerializable.toData when it is serializing the domain class. More...
Inherits apache::geode::client::SharedBase.
Public Member Functions | |
virtual PdxWriterPtr | markIdentityField (const char *fieldName)=0 |
Indicate that the given field name should be included in hashCode and equals checks of this object on a server that is using CacheFactory#setPdxReadSerialized or when a client executes a query on a server. More... | |
PdxWriter () | |
constructors More... | |
void | preserveSB () const |
Atomically increment reference count. More... | |
int32_t | refCount () |
void | releaseSB () const |
Atomically decrement reference count, the SharedBase object is automatically deleted when its reference count goes to zero. More... | |
virtual PdxWriterPtr | writeArrayOfByteArrays (const char *fieldName, int8_t **array, int arrayLength, int *elementLength)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriterPtr | writeBoolean (const char *fieldName, bool value)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriterPtr | writeBooleanArray (const char *fieldName, bool *array, int length)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriterPtr | writeByte (const char *fieldName, int8_t value)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriterPtr | writeByteArray (const char *fieldName, int8_t *array, int length)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriterPtr | writeChar (const char *fieldName, char value)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriterPtr | writeCharArray (const char *fieldName, char *array, int length)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriterPtr | writeDate (const char *fieldName, CacheableDatePtr date)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriterPtr | writeDouble (const char *fieldName, double value)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriterPtr | writeDoubleArray (const char *fieldName, double *array, int length)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriterPtr | writeFloat (const char *fieldName, float value)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriterPtr | writeFloatArray (const char *fieldName, float *array, int length)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriterPtr | writeInt (const char *fieldName, int32_t value)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriterPtr | writeIntArray (const char *fieldName, int32_t *array, int length)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriterPtr | writeLong (const char *fieldName, int64_t value)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriterPtr | writeLongArray (const char *fieldName, int64_t *array, int length)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriterPtr | writeObject (const char *fieldName, CacheablePtr value)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriterPtr | writeObjectArray (const char *fieldName, CacheableObjectArrayPtr array)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriterPtr | writeShort (const char *fieldName, int16_t value)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriterPtr | writeShortArray (const char *fieldName, int16_t *array, int length)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriterPtr | writeString (const char *fieldName, const char *value)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriterPtr | writeStringArray (const char *fieldName, char **array, int length)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriterPtr | writeUnreadFields (PdxUnreadFieldsPtr unread)=0 |
Writes the given unread fields to the serialized form. More... | |
virtual PdxWriterPtr | writeWideChar (const char *fieldName, wchar_t value)=0 |
Writes the named field with the given value to the serialized form The fields type is wchar_t More... | |
virtual PdxWriterPtr | writeWideCharArray (const char *fieldName, wchar_t *array, int length)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriterPtr | writeWideString (const char *fieldName, const wchar_t *value)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriterPtr | writeWideStringArray (const char *fieldName, wchar_t **array, int length)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual | ~PdxWriter () |
destructor More... | |
A PdxWriter will be passed to PdxSerializable.toData when it is serializing the domain class.
The domain class needs to serialize member fields using this abstract class. This class is implemented by Native Client.
|
inline |
constructors
|
inlinevirtual |
destructor
|
pure virtual |
Indicate that the given field name should be included in hashCode and equals checks of this object on a server that is using CacheFactory#setPdxReadSerialized or when a client executes a query on a server.
The fields that are marked as identity fields are used to generate the hashCode and equals methods of PdxInstance. Because of this, the identity fields should themselves either be primitives, or implement hashCode and equals.
If no fields are set as identity fields, then all fields will be used in hashCode and equals checks.
The identity fields should make marked after they are written using a write* method.
fieldName | the name of the field to mark as an identity field. |
IllegalStateException | if the named field does not exist. |
|
inherited |
Atomically increment reference count.
|
inlineinherited |
|
inherited |
Atomically decrement reference count, the SharedBase object is automatically deleted when its reference count goes to zero.
|
pure virtual |
Writes the named field with the given value to the serialized form.
The fields type is int8_t**
.
C++ int8_t** is mapped to Java byte[][].
fieldName | the name of the field to write |
array | the value of the field to write |
arrayLength | the length of the actual byte array field holding individual byte arrays to write |
elementLength | the length of the individual byte arrays to write |
IllegalStateException | if the named field has already been written or fieldName is NULL or empty. |
|
pure virtual |
Writes the named field with the given value to the serialized form.
The fields type is bool
.
C++ bool is mapped to Java boolean
fieldName | the name of the field to write |
value | the value of the field to write |
IllegalStateException | if the named field has already been written or fieldName is NULL or empty |
|
pure virtual |
Writes the named field with the given value to the serialized form.
The fields type is bool*
.
C++ bool* is mapped to Java boolean[]
fieldName | the name of the field to write |
array | the value of the field to write |
length | the length of the array field to write |
IllegalStateException | if the named field has already been written or fieldName is NULL or empty. |
|
pure virtual |
Writes the named field with the given value to the serialized form.
The fields type is int8_t
.
C++ int8_t is mapped to Java byte
fieldName | the name of the field to write |
value | the value of the field to write |
IllegalStateException | if the named field has already been written or fieldName is NULL or empty |
|
pure virtual |
Writes the named field with the given value to the serialized form.
The fields type is int8_t*
.
C++ int8_t* is mapped to Java byte[].
fieldName | the name of the field to write |
array | the value of the field to write |
length | the length of the array field to write |
IllegalStateException | if the named field has already been written or fieldName is NULL or empty. |
|
pure virtual |
Writes the named field with the given value to the serialized form.
The fields type is char
.
C++ char is mapped to Java char
.
fieldName | The name of the field to write. |
value | The value of the field to write |
IllegalStateException | if the named field has already been written or fieldName is NULL or empty |
|
pure virtual |
Writes the named field with the given value to the serialized form.
The fields type is char*
.
C++ char* is mapped to Java char[].
fieldName | the name of the field to write |
array | the value of the field to write |
length | the length of the array field to write |
IllegalStateException | if the named field has already been written or fieldName is NULL or empty. |
|
pure virtual |
Writes the named field with the given value to the serialized form.
The fields type is CacheableDatePtr
.
C++ CacheableDatePtr is mapped to Java Date
fieldName | the name of the field to write |
value | the value of the field to write |
IllegalStateException | if the named field has already been written or fieldName is NULL or empty |
|
pure virtual |
Writes the named field with the given value to the serialized form.
The fields type is double
.
C++ double is mapped to Java double
fieldName | the name of the field to write |
value | the value of the field to write |
IllegalStateException | if the named field has already been written or fieldName is NULL or empty |
|
pure virtual |
Writes the named field with the given value to the serialized form.
The fields type is double*
.
C++ double* is mapped to Java double[].
fieldName | the name of the field to write |
array | the value of the field to write |
length | the length of the array field to write |
IllegalStateException | if the named field has already been written or fieldName is NULL or empty. |
|
pure virtual |
Writes the named field with the given value to the serialized form.
The fields type is float
.
C++ float is mapped to Java float
fieldName | the name of the field to write |
value | the value of the field to write |
IllegalStateException | if the named field has already been written or fieldName is NULL or empty |
|
pure virtual |
Writes the named field with the given value to the serialized form.
The fields type is float*
.
C++ float* is mapped to Java float[].
fieldName | the name of the field to write |
array | the value of the field to write |
length | the length of the array field to write |
IllegalStateException | if the named field has already been written or fieldName is NULL or empty. |
|
pure virtual |
Writes the named field with the given value to the serialized form.
The fields type is int32_t
.
C++ int32_t is mapped to Java int
fieldName | the name of the field to write |
value | the value of the field to write |
IllegalStateException | if the named field has already been written or fieldName is NULL or empty |
|
pure virtual |
Writes the named field with the given value to the serialized form.
The fields type is int32_t*
.
C++ int32_t* is mapped to Java int[].
fieldName | the name of the field to write |
array | the value of the field to write |
length | the length of the array field to write |
IllegalStateException | if the named field has already been written or fieldName is NULL or empty. |
|
pure virtual |
Writes the named field with the given value to the serialized form.
The fields type is int64_t
.
C++ int64_t is mapped to Java long
fieldName | the name of the field to write |
value | the value of the field to write |
IllegalStateException | if the named field has already been written or fieldName is NULL or empty |
|
pure virtual |
Writes the named field with the given value to the serialized form.
The fields type is int64_t*
.
C++ int64_t* is mapped to Java long[].
fieldName | the name of the field to write |
array | the value of the field to write |
length | the length of the array field to write |
IllegalStateException | if the named field has already been written or fieldName is NULL or empty. |
|
pure virtual |
Writes the named field with the given value to the serialized form.
The fields type is CacheablePtr
.
C++ CacheablePtr is mapped to Java object.
It is best to use one of the other writeXXX methods if your field type will always be XXX. This method allows the field value to be anything that is an instance of Object. This gives you more flexibility but more space is used to store the serialized field.
Note that some Java objects serialized with this method may not be compatible with non-java languages.
fieldName | the name of the field to write |
value | the value of the field to write |
IllegalStateException | if the named field has already been written or fieldName is NULL or empty. |
|
pure virtual |
Writes the named field with the given value to the serialized form.
The fields type is CacheableObjectArrayPtr
. C++ CacheableObjectArrayPtr is mapped to Java Object[]. For how each element of the array is a mapped to C++ see writeObject. Note that this call may serialize elements that are not compatible with non-java languages.
fieldName | the name of the field to write |
array | the value of the field to write |
IllegalStateException | if the named field has already been written or fieldName is NULL or empty. |
|
pure virtual |
Writes the named field with the given value to the serialized form.
The fields type is int16_t
.
C++ int16_t is mapped to Java short
fieldName | the name of the field to write |
value | the value of the field to write |
IllegalStateException | if the named field has already been written or fieldName is NULL or empty |
|
pure virtual |
Writes the named field with the given value to the serialized form.
The fields type is int16_t*
.
C++ int16_t* is mapped to Java short[].
fieldName | the name of the field to write |
array | the value of the field to write |
length | the length of the array field to write |
IllegalStateException | if the named field has already been written or fieldName is NULL or empty. |
|
pure virtual |
Writes the named field with the given value to the serialized form.
The fields type is char*
.
C++ char* is mapped to Java String
fieldName | the name of the field to write |
value | the value of the field to write |
IllegalStateException | if the named field has already been written or fieldName is NULL or empty |
|
pure virtual |
Writes the named field with the given value to the serialized form.
The fields type is char**
.
C++ char** is mapped to Java String[].
fieldName | the name of the field to write |
array | the value of the field to write |
length | the length of the array field to write |
IllegalStateException | if the named field has already been written or fieldName is NULL or empty. |
|
pure virtual |
Writes the given unread fields to the serialized form.
The unread fields are obtained by calling PdxReader#readUnreadFields.
This method must be called first before any of the writeXXX methods is called.
unread | the object that was returned from PdxReader#readUnreadFields. |
IllegalStateException | if one of the writeXXX methods has already been called. |
|
pure virtual |
Writes the named field with the given value to the serialized form The fields type is wchar_t
C++ wchar_t is mapped to Java char
fieldName | The name of the field to write |
value | The value of the field to write |
IllegalStateException | if the named field has already been written or fieldName is NULL or empty |
|
pure virtual |
Writes the named field with the given value to the serialized form.
The fields type is wchar_t*
.
C++ wchar_t* is mapped to Java char[].
fieldName | the name of the field to write |
array | the value of the field to write |
length | the length of the array field to write |
IllegalStateException | if the named field has already been written or fieldName is NULL or empty. |
|
pure virtual |
Writes the named field with the given value to the serialized form.
The fields type is wchar_t*
.
C++ wchar_t* is mapped to Java String
fieldName | the name of the field to write |
value | the value of the field to write |
IllegalStateException | if the named field has already been written or fieldName is NULL or empty |
|
pure virtual |
Writes the named field with the given value to the serialized form.
The fields type is wchar_t**
.
C++ wchar_t** is mapped to Java String[].
fieldName | the name of the field to write |
array | the value of the field to write |
length | the length of the array field to write |
IllegalStateException | if the named field has already been written or fieldName is NULL or empty. |