Apache Ignite C++
Public Member Functions | List of all members
ignite::binary::BinaryMapWriter< K, V > Class Template Reference

Binary map writer. More...

#include <binary_containers.h>

Public Member Functions

 BinaryMapWriter (impl::binary::BinaryWriterImpl *impl, int32_t id)
 Constructor. More...
 
void Write (const K &key, const V &val)
 Write a map entry. More...
 
void Close ()
 Close the writer. More...
 

Detailed Description

template<typename K, typename V>
class ignite::binary::BinaryMapWriter< K, V >

Binary map writer.

Can be used to write map element by element.

Use Write() method to write map value by value, then finilize the writing by calling Close() method. Once the Close() method have been called, instance is not usable and will throw an IgniteError on any subsequent attempt to use it.

Constructor & Destructor Documentation

◆ BinaryMapWriter()

template<typename K , typename V >
ignite::binary::BinaryMapWriter< K, V >::BinaryMapWriter ( impl::binary::BinaryWriterImpl *  impl,
int32_t  id 
)
inline

Constructor.

Internal call. Should not be used by user.

Parameters
implWriter implementation.
idIdentifier.

Member Function Documentation

◆ Close()

template<typename K , typename V >
void ignite::binary::BinaryMapWriter< K, V >::Close ( )
inline

Close the writer.

This method should be called to finilize writing of the map.

Exceptions
IgniteErrorif the writer instance is closed already.

◆ Write()

template<typename K , typename V >
void ignite::binary::BinaryMapWriter< K, V >::Write ( const K &  key,
const V &  val 
)
inline

Write a map entry.

Parameters
keyKey element of the map entry.
valValue element of the map entry.
Exceptions
IgniteErrorif the writer instance is closed already.

The documentation for this class was generated from the following file: