Flex  0.17.9
Public Member Functions | List of all members
gs::IWalWriter Class Referenceabstract

#include <wal.h>

Inheritance diagram for gs::IWalWriter:
Inheritance graph
[legend]

Public Member Functions

virtual ~IWalWriter ()
 
virtual std::string type () const =0
 
virtual void open (const std::string &uri, int thread_id)=0
 
virtual void close ()=0
 
virtual bool append (const char *data, size_t length)=0
 

Detailed Description

The interface of wal writer.

Constructor & Destructor Documentation

◆ ~IWalWriter()

virtual gs::IWalWriter::~IWalWriter ( )
inlinevirtual

Member Function Documentation

◆ append()

virtual bool gs::IWalWriter::append ( const char *  data,
size_t  length 
)
pure virtual

Append data to the wal file.

Implemented in gs::LocalWalWriter.

◆ close()

virtual void gs::IWalWriter::close ( )
pure virtual

Close the wal writer. If a remote connection is hold by the wal writer, it should be closed.

Implemented in gs::LocalWalWriter.

◆ open()

virtual void gs::IWalWriter::open ( const std::string &  uri,
int  thread_id 
)
pure virtual

Open a wal file. In our design, each thread has its own wal file. The uri could be a file_path or a remote connection string.

Implemented in gs::LocalWalWriter.

◆ type()

virtual std::string gs::IWalWriter::type ( ) const
pure virtual

Implemented in gs::LocalWalWriter.


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