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

#include <SessionData.h>

Collaboration diagram for Hyperspace::SessionData:
Collaboration graph
[legend]

Public Member Functions

 SessionData (const sockaddr_in &_addr, uint32_t lease_interval, uint64_t _id)
 
void add_notification (Notification *notification)
 
void purge_notifications (std::set< uint64_t > &delivered_events)
 
const char * get_name () const
 
CommBufserialize_notifications_for_keepalive (CommHeader &header, uint32_t &len)
 
bool renew_lease ()
 
uint64_t get_id () const
 
const struct sockaddr_in & get_addr () const
 
void extend_lease (std::chrono::milliseconds millis)
 
bool is_expired (std::chrono::steady_clock::time_point now)
 
void expire ()
 
void set_expire_time_now ()
 
void set_name (const String &name_)
 

Private Attributes

std::mutex mutex
 
struct sockaddr_in addr
 
std::chrono::steady_clock::time_point expire_time
 
uint32_t m_lease_interval {}
 
uint64_t id
 
bool expired {}
 
std::list< Notification * > notifications
 
String name
 

Friends

struct LtSessionData
 

Detailed Description

Definition at line 37 of file SessionData.h.

Constructor & Destructor Documentation

Hyperspace::SessionData::SessionData ( const sockaddr_in &  _addr,
uint32_t  lease_interval,
uint64_t  _id 
)
inline

Definition at line 39 of file SessionData.h.

Member Function Documentation

void Hyperspace::SessionData::add_notification ( Notification notification)
inline

Definition at line 45 of file SessionData.h.

void Hyperspace::SessionData::expire ( )
inline

Definition at line 119 of file SessionData.h.

void Hyperspace::SessionData::extend_lease ( std::chrono::milliseconds  millis)
inline

Definition at line 109 of file SessionData.h.

const struct sockaddr_in& Hyperspace::SessionData::get_addr ( ) const
inline

Definition at line 107 of file SessionData.h.

uint64_t Hyperspace::SessionData::get_id ( ) const
inline

Definition at line 105 of file SessionData.h.

const char* Hyperspace::SessionData::get_name ( ) const
inline

Definition at line 70 of file SessionData.h.

bool Hyperspace::SessionData::is_expired ( std::chrono::steady_clock::time_point  now)
inline

Definition at line 114 of file SessionData.h.

void Hyperspace::SessionData::purge_notifications ( std::set< uint64_t > &  delivered_events)
inline

Definition at line 56 of file SessionData.h.

bool Hyperspace::SessionData::renew_lease ( )
inline

Definition at line 96 of file SessionData.h.

CommBuf* Hyperspace::SessionData::serialize_notifications_for_keepalive ( CommHeader header,
uint32_t &  len 
)
inline

Definition at line 75 of file SessionData.h.

void Hyperspace::SessionData::set_expire_time_now ( )
inline

Definition at line 132 of file SessionData.h.

void Hyperspace::SessionData::set_name ( const String name_)
inline

Definition at line 137 of file SessionData.h.

Friends And Related Function Documentation

friend struct LtSessionData
friend

Definition at line 142 of file SessionData.h.

Member Data Documentation

struct sockaddr_in Hyperspace::SessionData::addr
private

Definition at line 147 of file SessionData.h.

std::chrono::steady_clock::time_point Hyperspace::SessionData::expire_time
private

Definition at line 148 of file SessionData.h.

bool Hyperspace::SessionData::expired {}
private

Definition at line 151 of file SessionData.h.

uint64_t Hyperspace::SessionData::id
private

Definition at line 150 of file SessionData.h.

uint32_t Hyperspace::SessionData::m_lease_interval {}
private

Definition at line 149 of file SessionData.h.

std::mutex Hyperspace::SessionData::mutex
private

Definition at line 146 of file SessionData.h.

String Hyperspace::SessionData::name
private

Definition at line 153 of file SessionData.h.

std::list<Notification *> Hyperspace::SessionData::notifications
private

Definition at line 152 of file SessionData.h.


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