VMware Tanzu GemFire Native C++ Reference
10.1.5
|
A PdxWriter will be passed to PdxSerializable.toData when it is serializing the domain class. More...
Public Member Functions | |
virtual PdxWriter & | markIdentityField (const std::string &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 {} or when a client executes a query on a server. More... | |
PdxWriter ()=default | |
constructors More... | |
virtual PdxWriter & | writeArrayOfByteArrays (const std::string &fieldName, int8_t *const *const array, int arrayLength, const int *elementLength)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriter & | writeBoolean (const std::string &fieldName, bool value)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriter & | writeBooleanArray (const std::string &fieldName, const std::vector< bool > &array)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriter & | writeByte (const std::string &fieldName, int8_t value)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriter & | writeByteArray (const std::string &fieldName, const std::vector< int8_t > &array)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriter & | writeChar (const std::string &fieldName, char16_t value)=0 |
Writes the named field with the given value to the serialized form The fields type is char16_t More... | |
virtual PdxWriter & | writeCharArray (const std::string &fieldName, const std::vector< char16_t > &array)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriter & | writeDate (const std::string &fieldName, std::shared_ptr< CacheableDate > date)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriter & | writeDouble (const std::string &fieldName, double value)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriter & | writeDoubleArray (const std::string &fieldName, const std::vector< double > &array)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriter & | writeFloat (const std::string &fieldName, float value)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriter & | writeFloatArray (const std::string &fieldName, const std::vector< float > &array)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriter & | writeInt (const std::string &fieldName, int32_t value)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriter & | writeIntArray (const std::string &fieldName, const std::vector< int32_t > &array)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriter & | writeLong (const std::string &fieldName, int64_t value)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriter & | writeLongArray (const std::string &fieldName, const std::vector< int64_t > &array)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriter & | writeObject (const std::string &fieldName, std::shared_ptr< Cacheable > value)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriter & | writeObjectArray (const std::string &fieldName, std::shared_ptr< CacheableObjectArray > array)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriter & | writeShort (const std::string &fieldName, int16_t value)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriter & | writeShortArray (const std::string &fieldName, const std::vector< int16_t > &array)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriter & | writeString (const std::string &fieldName, const std::string &value)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriter & | writeStringArray (const std::string &fieldName, const std::vector< std::string > &array)=0 |
Writes the named field with the given value to the serialized form. More... | |
virtual PdxWriter & | writeUnreadFields (std::shared_ptr< PdxUnreadFields > unread)=0 |
Writes the given unread fields to the serialized form. More... | |
virtual | ~PdxWriter ()=default |
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.
|
default |
constructors
|
virtualdefault |
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 {} 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. |
|
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 nullptr 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 nullptr 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 nullptr 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 nullptr 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 nullptr or empty. |
|
pure virtual |
Writes the named field with the given value to the serialized form The fields type is char16_t
C++ char16_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 nullptr or empty |
|
pure virtual |
Writes the named field with the given value to the serialized form.
The fields type is char16_t*
.
C++ char16_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 nullptr or empty. |
|
pure virtual |
Writes the named field with the given value to the serialized form.
The fields type is CacheableDatePtr
.
C++ std::shared_ptr<CacheableDate> 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 nullptr 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 nullptr 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 nullptr 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 nullptr 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 nullptr 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 nullptr 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 nullptr 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 nullptr 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 nullptr or empty. |
|
pure virtual |
Writes the named field with the given value to the serialized form.
The fields type is CacheablePtr
.
C++ std::shared_ptr<Cacheable> 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 nullptr or empty. |
|
pure virtual |
Writes the named field with the given value to the serialized form.
The fields type is CacheableObjectArrayPtr
. C++ std::shared_ptr<CacheableObjectArray> is mapped to Java Object[]. For how each element of the array is a mapped to C++ see {}. 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 this PdxWriter IllegalStateException if the named field has already been written or fieldName is nullptr 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 nullptr 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 nullptr or empty. |
|
pure virtual |
Writes the named field with the given value to the serialized form.
The fields type is char*
.
C++ std::string is mapped to Java String
fieldName | the name of the field to write |
value | the UTF-8 value of the field to write |
IllegalStateException | if the named field has already been written or fieldName is nullptr or empty |
|
pure virtual |
Writes the named field with the given value to the serialized form.
The fields type is std::vector<std::string>
.
C++ std::vector<std::string> 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 nullptr or empty. |
|
pure virtual |
Writes the given unread fields to the serialized form.
The unread fields are obtained by calling {}. This method must be called first before any of the writeXXX methods is called.
unread | the object that was returned from {}. this PdxWriter IllegalStateException if one of the writeXXX methods has already been called. |