AMPS C/C++ Client Class Reference AMPS C/C++ Client Version 5.3.5.7

Public Member Functions | List of all members
AMPS::MMapStoreBuffer Class Reference

A Buffer implementation that uses a memory mapped file as its storage. More...

`#include <MMapStoreBuffer.hpp>`

Inheritance diagram for AMPS::MMapStoreBuffer:

## Public Member Functions
| MMapStoreBuffer (const std::string &fileName_, size_t initialSize_=AMPS_MEMORYBUFFER_DEFAULT_LENGTH)
| Create an MMapStoreBuffer using fileName_ as the name of the memory mapped file used for storage. More...
virtual void | setSize (size_t newSize_)
| Set the size for the buffer. More...
Public Member Functions inherited from AMPS::MemoryStoreBuffer
virtual size_t | getSize () const
| Get the current size of the Buffer in bytes. More...
virtual size_t | getPosition () const
| Get the current position in the buffer. More...
virtual void | setPosition (size_t position_)
| Set the buffer postion to a location. More...
virtual void | putByte (char byte_)
| Put a byte into the buffer at the current position and advance. More...
virtual char | getByte ()
| Get the next byte from the buffer and advance. More...
virtual void | putSizet (size_t s_)
| Put a size_t value into the buffer at the current position and advance past it. More...
virtual size_t | getSizet ()
| Get a size_t value at the current buffer position and advance past it. More...
virtual void | putInt32 (amps_int32_t s_)
| Put a 32-bit int value into the buffer and advance past it. More...
virtual amps_int32_t | getInt32 ()
| Get the 32-bit int value at the current buffer position and advance past it. More...
virtual void | putUint32 (amps_uint32_t s_)
| Put an unsigned 32-bit int value into the buffer at the current position and advance past the end of it. More...
virtual amps_uint32_t | getUint32 ()
| Get the unsigned 32-bit int value at the current buffer position and advance past it. More...
virtual void | putInt64 (amps_int64_t s_)
| Put an amps_int64_t value into the buffer at the current position and advance past it. More...
virtual amps_int64_t | getInt64 ()
| Get a 64-bit int value at the current buffer position and advance past it. More...
virtual void | putUint64 (amps_uint64_t s_)
| Put an amps_uint64_t value into the buffer at the current position and advance past it. More...
virtual amps_uint64_t | getUint64 ()
| Get an unsigned 64-bit int value at the current buffer position and advance past it. More...
virtual void | putBytes (const char *data_, size_t dataLength_)
| Put the given length of bytes in data into the buffer at the current position and advance past them. More...
virtual void | putBytes (const Buffer::ByteArray &bytes_)
| Put the given bytes into the buffer at the current position and advance past them. More...
virtual Buffer::ByteArray | getBytes (size_t numBytes_)
| Get the given number of bytes from the buffer. More...
virtual void | copyBytes (char *buffer_, size_t numBytes_)
| Copy the given number of bytes from this buffer to the given buffer. More...
virtual void | zero (size_t offset_, size_t length_)
| Set the given number of bytes in the buffer to zero starting at the given position. More...
virtual void | copyBytes (size_t destination_, size_t source_, size_t number_)
| Move the given number of bytes at the given location to the new location Buffer should do this in the most optimal fashion. More...

## Detailed Description

A Buffer implementation that uses a memory mapped file as its storage.

## Constructor & Destructor Documentation

## ◆ MMapStoreBuffer()

AMPS::MMapStoreBuffer::MMapStoreBuffer | ( | const std::string & | fileName_,
|  | size_t | initialSize_ = `AMPS_MEMORYBUFFER_DEFAULT_LENGTH`
| ) |  |
| inline

Create an MMapStoreBuffer using fileName_ as the name of the memory mapped file used for storage.

If the file exists and contains valid messages, they will be available for replay.

Parameters

  fileName_ | The name of the file mapped to memory.
  initialSize_ | The initial size of the buffer in bytes.

## Member Function Documentation

## ◆ setSize()

virtual void AMPS::MMapStoreBuffer::setSize | ( | size_t | newSize_ | ) |
| inline virtual

Set the size for the buffer.

Parameters

  newSize_ | The new size in bytes for the buffer.

Reimplemented from AMPS::MemoryStoreBuffer.

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

- include/amps/MMapStoreBuffer.hpp