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::RecoveredServers Class Reference

Set of recovered servers. More...

#include <RecoveredServers.h>

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

Public Member Functions

 RecoveredServers ()
 Default constructor. More...
 
 RecoveredServers (const MetaLog::EntityHeader &header)
 Constructor with MetaLog header. More...
 
virtual ~RecoveredServers ()
 Destructor. More...
 
void add (const std::string &location)
 Adds proxy name to recovered servers set. More...
 
bool contains (const std::string &location)
 Check to see if proxy name is in recovered servers set. 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 (const uint8_t **bufp, size_t *remainp, uint16_t definition_version) override
 MetaLog entity decode method. More...
 
const std::string name () override
 Returns the name of the entity (RecoveredServers). More...
 
void display (std::ostream &os) override
 Writes a textual representation of the entity to an output stream. More...
 

Private Attributes

std::set< std::string > m_servers
 Set of proxy names of recovered servers. 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

Set of recovered servers.

This class maintains the set of proxy names of servers that have been recovered. It is used to ensure that a server does not inadvertently get recovered twice.

Definition at line 44 of file RecoveredServers.h.

Constructor & Destructor Documentation

RecoveredServers::RecoveredServers ( )

Default constructor.

This constructor constructs an empty object.

Definition at line 38 of file RecoveredServers.cc.

RecoveredServers::RecoveredServers ( const MetaLog::EntityHeader header)

Constructor with MetaLog header.

This constructor constructs an empty object to be populated by an MML entity.

Parameters
headerMML entity header

Definition at line 42 of file RecoveredServers.cc.

virtual Hypertable::RecoveredServers::~RecoveredServers ( )
inlinevirtual

Destructor.

Definition at line 58 of file RecoveredServers.h.

Member Function Documentation

void RecoveredServers::add ( const std::string &  location)

Adds proxy name to recovered servers set.

Parameters
locationProxy name of recovered server

Definition at line 46 of file RecoveredServers.cc.

bool RecoveredServers::contains ( const std::string &  location)

Check to see if proxy name is in recovered servers set.

Parameters
locationProxy name of server to check
Returns
true if server identified by location is in the recovered servers set, false otherwise.

Definition at line 51 of file RecoveredServers.cc.

void RecoveredServers::decode ( const uint8_t **  bufp,
size_t *  remainp,
uint16_t  definition_version 
)
overrideprivatevirtual

MetaLog entity decode method.

Reimplemented from Hypertable::MetaLog::Entity.

Definition at line 80 of file RecoveredServers.cc.

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

Reads serialized representation of object from a buffer.

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

Implements Hypertable::Serializable.

Definition at line 73 of file RecoveredServers.cc.

void RecoveredServers::display ( std::ostream &  os)
overrideprivatevirtual

Writes a textual representation of the entity to an output stream.

Parameters
osOutput stream

Reimplemented from Hypertable::MetaLog::Entity.

Definition at line 89 of file RecoveredServers.cc.

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

Writes serialized representation of object to a buffer.

Parameters
bufpAddress of destination buffer pointer (advanced by call)

Implements Hypertable::Serializable.

Definition at line 67 of file RecoveredServers.cc.

size_t RecoveredServers::encoded_length_internal ( ) const
overrideprivatevirtual

Returns internal serialized length.

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

Implements Hypertable::Serializable.

Definition at line 60 of file RecoveredServers.cc.

uint8_t RecoveredServers::encoding_version ( ) const
overrideprivatevirtual

Returns encoding version.

Returns
Encoding version

Implements Hypertable::Serializable.

Definition at line 56 of file RecoveredServers.cc.

const std::string RecoveredServers::name ( )
overrideprivatevirtual

Returns the name of the entity (RecoveredServers).

Returns
Name of entity (RecoveredServers).

Implements Hypertable::MetaLog::Entity.

Definition at line 85 of file RecoveredServers.cc.

Member Data Documentation

std::set<std::string> Hypertable::RecoveredServers::m_servers
private

Set of proxy names of recovered servers.

Definition at line 107 of file RecoveredServers.h.


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