Provides a mean of writing portable fields to a binary in form of java primitives arrays of java primitives , nested portable fields and array of portable fields.
More...
#include <PortableWriter.h>
|
| PortableWriter (pimpl::DefaultPortableWriter *defaultPortableWriter) |
| Internal api constructor.
|
|
| PortableWriter (pimpl::ClassDefinitionWriter *classDefinitionWriter) |
| Internal api constructor.
|
|
void | writeInt (const char *fieldName, int value) |
|
void | writeLong (const char *fieldName, long value) |
|
void | writeBoolean (const char *fieldName, bool value) |
|
void | writeByte (const char *fieldName, byte value) |
|
void | writeChar (const char *fieldName, int value) |
|
void | writeDouble (const char *fieldName, double value) |
|
void | writeFloat (const char *fieldName, float value) |
|
void | writeShort (const char *fieldName, short value) |
|
void | writeUTF (const char *fieldName, const std::string *value) |
|
void | writeByteArray (const char *fieldName, const std::vector< byte > *values) |
|
void | writeCharArray (const char *fieldName, const std::vector< char > *values) |
|
void | writeShortArray (const char *fieldName, const std::vector< short > *values) |
|
void | writeIntArray (const char *fieldName, const std::vector< int > *values) |
|
void | writeLongArray (const char *fieldName, const std::vector< long > *values) |
|
void | writeFloatArray (const char *fieldName, const std::vector< float > *values) |
|
void | writeDoubleArray (const char *fieldName, const std::vector< double > *values) |
|
void | end () |
| Internal api , should not be called by end user.
|
|
template<typename T > |
void | writeNullPortable (const char *fieldName) |
| To write a null portable value. More...
|
|
template<typename T > |
void | writePortable (const char *fieldName, const T *portable) |
|
template<typename T > |
void | writePortableArray (const char *fieldName, const std::vector< T > *values) |
|
ObjectDataOutput & | getRawDataOutput () |
| After writing portable fields, one can write remaining fields in old fashioned way consecutively at the end of stream. More...
|
|
Provides a mean of writing portable fields to a binary in form of java primitives arrays of java primitives , nested portable fields and array of portable fields.
ObjectDataOutput & hazelcast::client::serialization::PortableWriter::getRawDataOutput |
( |
| ) |
|
After writing portable fields, one can write remaining fields in old fashioned way consecutively at the end of stream.
User should not that after getting rawDataOutput trying to write portable fields will result in IOException
- Returns
- ObjectDataOutput
- Exceptions
-
void hazelcast::client::serialization::PortableWriter::writeBoolean |
( |
const char * |
fieldName, |
|
|
bool |
value |
|
) |
| |
- Parameters
-
fieldName | name of the field |
value | int value to be written |
- Exceptions
-
void hazelcast::client::serialization::PortableWriter::writeByte |
( |
const char * |
fieldName, |
|
|
byte |
value |
|
) |
| |
- Parameters
-
fieldName | name of the field |
value | int value to be written |
- Exceptions
-
void hazelcast::client::serialization::PortableWriter::writeByteArray |
( |
const char * |
fieldName, |
|
|
const std::vector< byte > * |
values |
|
) |
| |
- Parameters
-
fieldName | name of the field |
values | byte array to be written |
- Exceptions
-
void hazelcast::client::serialization::PortableWriter::writeChar |
( |
const char * |
fieldName, |
|
|
int |
value |
|
) |
| |
- Parameters
-
fieldName | name of the field |
value | int value to be written |
- Exceptions
-
void hazelcast::client::serialization::PortableWriter::writeCharArray |
( |
const char * |
fieldName, |
|
|
const std::vector< char > * |
values |
|
) |
| |
- Parameters
-
fieldName | name of the field |
values | char array to be written |
- Exceptions
-
void hazelcast::client::serialization::PortableWriter::writeDouble |
( |
const char * |
fieldName, |
|
|
double |
value |
|
) |
| |
- Parameters
-
fieldName | name of the field |
value | int value to be written |
- Exceptions
-
void hazelcast::client::serialization::PortableWriter::writeDoubleArray |
( |
const char * |
fieldName, |
|
|
const std::vector< double > * |
values |
|
) |
| |
- Parameters
-
fieldName | name of the field |
values | double array to be written |
- Exceptions
-
void hazelcast::client::serialization::PortableWriter::writeFloat |
( |
const char * |
fieldName, |
|
|
float |
value |
|
) |
| |
- Parameters
-
fieldName | name of the field |
value | int value to be written |
- Exceptions
-
void hazelcast::client::serialization::PortableWriter::writeFloatArray |
( |
const char * |
fieldName, |
|
|
const std::vector< float > * |
values |
|
) |
| |
- Parameters
-
fieldName | name of the field |
values | float array to be written |
- Exceptions
-
void hazelcast::client::serialization::PortableWriter::writeInt |
( |
const char * |
fieldName, |
|
|
int |
value |
|
) |
| |
- Parameters
-
fieldName | name of the field |
value | int value to be written |
- Exceptions
-
void hazelcast::client::serialization::PortableWriter::writeIntArray |
( |
const char * |
fieldName, |
|
|
const std::vector< int > * |
values |
|
) |
| |
- Parameters
-
fieldName | name of the field |
values | int array to be written |
- Exceptions
-
void hazelcast::client::serialization::PortableWriter::writeLong |
( |
const char * |
fieldName, |
|
|
long |
value |
|
) |
| |
- Parameters
-
fieldName | name of the field |
value | int value to be written |
- Exceptions
-
void hazelcast::client::serialization::PortableWriter::writeLongArray |
( |
const char * |
fieldName, |
|
|
const std::vector< long > * |
values |
|
) |
| |
- Parameters
-
fieldName | name of the field |
values | long array to be written |
- Exceptions
-
template<typename T >
void hazelcast::client::serialization::PortableWriter::writeNullPortable |
( |
const char * |
fieldName | ) |
|
|
inline |
To write a null portable value.
- Template Parameters
-
type | of the portable field |
- Parameters
-
fieldName | name of the field |
- Exceptions
-
template<typename T >
void hazelcast::client::serialization::PortableWriter::writePortable |
( |
const char * |
fieldName, |
|
|
const T * |
portable |
|
) |
| |
|
inline |
- Template Parameters
-
type | of the portable class |
- Parameters
-
fieldName | name of the field |
portable | Portable to be written |
- Exceptions
-
template<typename T >
void hazelcast::client::serialization::PortableWriter::writePortableArray |
( |
const char * |
fieldName, |
|
|
const std::vector< T > * |
values |
|
) |
| |
|
inline |
- Template Parameters
-
type | of the portable class |
- Parameters
-
fieldName | name of the field |
values | portable array to be written |
- Exceptions
-
void hazelcast::client::serialization::PortableWriter::writeShort |
( |
const char * |
fieldName, |
|
|
short |
value |
|
) |
| |
- Parameters
-
fieldName | name of the field |
value | int value to be written |
- Exceptions
-
void hazelcast::client::serialization::PortableWriter::writeShortArray |
( |
const char * |
fieldName, |
|
|
const std::vector< short > * |
values |
|
) |
| |
- Parameters
-
fieldName | name of the field |
values | short array to be written |
- Exceptions
-
void hazelcast::client::serialization::PortableWriter::writeUTF |
( |
const char * |
fieldName, |
|
|
const std::string * |
value |
|
) |
| |
- Parameters
-
fieldName | name of the field |
value | utf string value to be written |
- Exceptions
-
The documentation for this class was generated from the following files:
- hazelcast/include/hazelcast/client/serialization/PortableWriter.h
- hazelcast/src/hazelcast/client/serialization/PortableWriter.cpp