0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Hypertable::MetaLogEntityRemoveOkLogs Class Reference

MetaLog entity to track transfer logs that can be safely removed More...

#include <MetaLogEntityRemoveOkLogs.h>

Inheritance diagram for Hypertable::MetaLogEntityRemoveOkLogs:
Inheritance graph
[legend]
Collaboration diagram for Hypertable::MetaLogEntityRemoveOkLogs:
Collaboration graph
[legend]

Public Member Functions

 MetaLogEntityRemoveOkLogs (const MetaLog::EntityHeader &header_)
 Constructor initialized from Metalog entity header. More...
 
 MetaLogEntityRemoveOkLogs (StringSet &logs)
 Constructor. More...
 
 MetaLogEntityRemoveOkLogs ()
 Constructor. More...
 
virtual ~MetaLogEntityRemoveOkLogs ()
 Destructor. More...
 
void insert (const String &pathname)
 Inserts a log into the remove ok set. More...
 
void insert (StringSet &logs)
 Inserts a set of logs into the remove ok set. More...
 
void remove (StringSet &logs)
 Removes logs from the remove ok set. More...
 
void get (StringSet &logs)
 Gets logs in the remove ok set. More...
 
uint32_t decode_version ()
 Returns format of decoded entity. More...
 
void decode (const uint8_t **bufp, size_t *remainp, uint16_t definition_version) override
 Reads serialized encoding of the entity. More...
 
const String name () override
 Returns the entity name ("Range") More...
 
void display (std::ostream &os) override
 Writes a human readable representation of the object state to an output stream. More...
 
- Public Member Functions inherited from Hypertable::MetaLog::Entity
 Entity (int32_t type)
 Constructor from entity type. More...
 
 Entity (const EntityHeader &header_)
 Constructor from entity header. More...
 
virtual ~Entity ()
 Destructor. More...
 
void lock ()
 Locks the entity's mutex. More...
 
void unlock ()
 Unlocks the entity's mutex. More...
 
void mark_for_removal ()
 Marks entity for removal. More...
 
bool marked_for_removal ()
 Checks if entity is marked for removal. More...
 
int64_t id () const
 Returns the entity ID. More...
 
- Public Member Functions inherited from Hypertable::Serializable
virtual size_t encoded_length () const
 Returns serialized object length. More...
 
virtual void encode (uint8_t **bufp) const
 Writes serialized representation of object to a buffer. More...
 
virtual void decode (const uint8_t **bufp, size_t *remainp)
 Reads serialized representation of object from a buffer. More...
 

Private Member Functions

uint8_t encoding_version () const override
 Returns encoding version. More...
 
size_t encoded_length_internal () const override
 Returns internal serialized length. More...
 
void encode_internal (uint8_t **bufp) const override
 Writes serialized representation of object to a buffer. More...
 
void decode_internal (uint8_t version, const uint8_t **bufp, size_t *remainp) override
 Reads serialized representation of object from a buffer. More...
 
void decode_old (const uint8_t **bufp, size_t *remainp)
 

Private Attributes

StringSet m_log_set
 Set of log pathnames that can be safely removed. More...
 
uint32_t m_decode_version
 Version of serialized entity decoded. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Hypertable::MetaLog::Entity
void encode_entry (uint8_t **bufp)
 Encodes entity header plus serialized state. More...
 
- Protected Attributes inherited from Hypertable::MetaLog::Entity
std::mutex m_mutex
 Mutex for serializing access to members More...
 
EntityHeader header
 Entity header More...
 

Detailed Description

MetaLog entity to track transfer logs that can be safely removed

Definition at line 46 of file MetaLogEntityRemoveOkLogs.h.

Constructor & Destructor Documentation

MetaLogEntityRemoveOkLogs::MetaLogEntityRemoveOkLogs ( const MetaLog::EntityHeader header_)

Constructor initialized from Metalog entity header.

Parameters
header_Metalog entity header

Definition at line 41 of file MetaLogEntityRemoveOkLogs.cc.

MetaLogEntityRemoveOkLogs::MetaLogEntityRemoveOkLogs ( StringSet logs)

Constructor.

Parameters
logsInitial set of log pathnames

Definition at line 45 of file MetaLogEntityRemoveOkLogs.cc.

MetaLogEntityRemoveOkLogs::MetaLogEntityRemoveOkLogs ( )

Constructor.

Definition at line 50 of file MetaLogEntityRemoveOkLogs.cc.

virtual Hypertable::MetaLogEntityRemoveOkLogs::~MetaLogEntityRemoveOkLogs ( )
inlinevirtual

Destructor.

Definition at line 63 of file MetaLogEntityRemoveOkLogs.h.

Member Function Documentation

void MetaLogEntityRemoveOkLogs::decode ( const uint8_t **  bufp,
size_t *  remainp,
uint16_t  definition_version 
)
overridevirtual

Reads serialized encoding of the entity.

This method restores the state of the object by decoding a serialized representation of the state from the memory location pointed to by *bufp.

Parameters
bufpAddress of source buffer pointer (advanced by call)
remainpAmount of remaining buffer pointed to by *bufp (decremented by call).
definition_versionVersion of DefinitionMaster
See also
encode() for serialization format

Reimplemented from Hypertable::MetaLog::Entity.

Definition at line 76 of file MetaLogEntityRemoveOkLogs.cc.

void MetaLogEntityRemoveOkLogs::decode_internal ( uint8_t  version,
const uint8_t **  bufp,
size_t *  remainp 
)
overrideprivatevirtual

Reads serialized representation of object from a buffer.

This function is to be overridden by derived classes and should decode the object per-se as encoded with encode_internal().

Parameters
versionEncoding version
bufpAddress of destination buffer pointer (advanced by call)
remainpAddress of integer holding amount of serialized encoding remaining
See also
encode_internal() for encoding format

Implements Hypertable::Serializable.

Definition at line 101 of file MetaLogEntityRemoveOkLogs.cc.

void MetaLogEntityRemoveOkLogs::decode_old ( const uint8_t **  bufp,
size_t *  remainp 
)
private

Definition at line 109 of file MetaLogEntityRemoveOkLogs.cc.

uint32_t Hypertable::MetaLogEntityRemoveOkLogs::decode_version ( )
inline

Returns format of decoded entity.

Returns
Format of decoded entity.

Definition at line 88 of file MetaLogEntityRemoveOkLogs.h.

void MetaLogEntityRemoveOkLogs::display ( std::ostream &  os)
overridevirtual

Writes a human readable representation of the object state to an output stream.

Parameters
osOutput stream

Reimplemented from Hypertable::MetaLog::Entity.

Definition at line 129 of file MetaLogEntityRemoveOkLogs.cc.

void MetaLogEntityRemoveOkLogs::encode_internal ( uint8_t **  bufp) const
overrideprivatevirtual

Writes serialized representation of object to a buffer.

This function is to be overridden by derived classes and should encode the object per-se.

Parameters
bufpAddress of destination buffer pointer (advanced by call)

Implements Hypertable::Serializable.

Definition at line 95 of file MetaLogEntityRemoveOkLogs.cc.

size_t MetaLogEntityRemoveOkLogs::encoded_length_internal ( ) const
overrideprivatevirtual

Returns internal serialized length.

This function is to be overridden by derived classes and should return the length of the the serialized object per-se.

Returns
Internal serialized length
See also
encode_internal() for encoding format

Implements Hypertable::Serializable.

Definition at line 88 of file MetaLogEntityRemoveOkLogs.cc.

uint8_t MetaLogEntityRemoveOkLogs::encoding_version ( ) const
overrideprivatevirtual

Returns encoding version.

Returns
Encoding version

Implements Hypertable::Serializable.

Definition at line 84 of file MetaLogEntityRemoveOkLogs.cc.

void MetaLogEntityRemoveOkLogs::get ( StringSet logs)

Gets logs in the remove ok set.

Parameters
logsOutput parameter filled in with logs

Definition at line 71 of file MetaLogEntityRemoveOkLogs.cc.

void MetaLogEntityRemoveOkLogs::insert ( const String pathname)

Inserts a log into the remove ok set.

Parameters
pathnamePathname of log to insert

Definition at line 54 of file MetaLogEntityRemoveOkLogs.cc.

void MetaLogEntityRemoveOkLogs::insert ( StringSet logs)

Inserts a set of logs into the remove ok set.

Parameters
logsSet of logs to insert

Definition at line 60 of file MetaLogEntityRemoveOkLogs.cc.

const String MetaLogEntityRemoveOkLogs::name ( )
overridevirtual

Returns the entity name ("Range")

Returns
Entity name

Implements Hypertable::MetaLog::Entity.

Definition at line 125 of file MetaLogEntityRemoveOkLogs.cc.

void MetaLogEntityRemoveOkLogs::remove ( StringSet logs)

Removes logs from the remove ok set.

Parameters
logsLogs to remove

Definition at line 65 of file MetaLogEntityRemoveOkLogs.cc.

Member Data Documentation

uint32_t Hypertable::MetaLogEntityRemoveOkLogs::m_decode_version
private

Version of serialized entity decoded.

Definition at line 133 of file MetaLogEntityRemoveOkLogs.h.

StringSet Hypertable::MetaLogEntityRemoveOkLogs::m_log_set
private

Set of log pathnames that can be safely removed.

Definition at line 130 of file MetaLogEntityRemoveOkLogs.h.


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