#include <LogHost.h>
Public Member Functions | |
LogHost (const char *object_filename, uint64_t object_signature) | |
LogHost (const LogHost &) | |
~LogHost () | |
int | set_name_or_ipstr (char *name_or_ipstr) |
int | set_ipstr_port (char *ipstr, unsigned int port) |
int | set_name_port (char *hostname, unsigned int port) |
bool | connected (bool ping) |
bool | connect () |
void | disconnect () |
int | preproc_and_try_delete (LogBuffer *lb) |
void | orphan_write_and_try_delete (LogBuffer *lb) |
char const * | name () const |
IpAddr const & | ip_addr () const |
in_port_t | port () const |
char const * | ipstr () const |
void | display (FILE *fd=stdout) |
LogFile * | get_orphan_logfile () const |
int | do_filesystem_checks () |
LINK (LogHost, link) | |
SLINK (LogHost, failover_link) | |
Friends | |
class | LogCollationClientSM |
Definition at line 36 of file LogHost.h.
LogHost::LogHost | ( | const char * | object_filename, | |
uint64_t | object_signature | |||
) |
LogHost::LogHost | ( | const LogHost & | rhs | ) |
Definition at line 68 of file LogHost.cc.
LogHost::~LogHost | ( | ) |
Definition at line 84 of file LogHost.cc.
References ats_free().
bool LogHost::connect | ( | ) |
Definition at line 171 of file LogHost.cc.
References IpEndpoint::assign(), ats_ip_nptop(), LogSock::connect(), connected(), Debug, disconnect(), ink_assert, is_debug_tag_set, IpAddr::isValid(), Note, PING, and IpEndpoint::sa.
bool LogHost::connected | ( | bool | ping | ) |
Definition at line 161 of file LogHost.cc.
References LogSock::is_connected().
void LogHost::disconnect | ( | ) |
void LogHost::display | ( | FILE * | fd = stdout |
) |
Definition at line 315 of file LogHost.cc.
References connected(), name(), NOPING, and port().
LogFile* LogHost::get_orphan_logfile | ( | ) | const [inline] |
Definition at line 72 of file LogHost.h.
Referenced by LogObject::get_file_size_bytes().
IpAddr const& LogHost::ip_addr | ( | ) | const [inline] |
Definition at line 66 of file LogHost.h.
Referenced by LogHostList::operator==(), and LogCollationClientSM::send().
char const* LogHost::ipstr | ( | ) | const [inline] |
Definition at line 68 of file LogHost.h.
Referenced by LogHostList::operator==().
LogHost::LINK | ( | LogHost | , | |
link | ||||
) |
char const* LogHost::name | ( | ) | const [inline] |
Definition at line 65 of file LogHost.h.
Referenced by display(), LogObject::displayAsXML(), LogHostList::operator==(), preproc_and_try_delete(), set_ipstr_port(), and set_name_port().
void LogHost::orphan_write_and_try_delete | ( | LogBuffer * | lb | ) |
Definition at line 294 of file LogHost.cc.
References LogBufferHeader::byte_count, Log::config, Debug, LogBuffer::destroy(), LogBufferHeader::entry_count, LogBuffer::header(), log_rsb, log_stat_bytes_lost_before_sent_to_network_stat, log_stat_num_lost_before_sent_to_network_stat, RecIncrRawStat(), and this_thread().
Referenced by LogHostList::preproc_and_try_delete().
in_port_t LogHost::port | ( | ) | const [inline] |
Definition at line 67 of file LogHost.h.
Referenced by display(), LogHostList::operator==(), LogCollationClientSM::send(), and set_name_port().
int LogHost::preproc_and_try_delete | ( | LogBuffer * | lb | ) |
Definition at line 253 of file LogHost.cc.
References LogBuffer::destroy(), LogBufferHeader::entry_count, LogBuffer::header(), ink_assert, LogCollationClientSM, name(), Note, and LogCollationClientSM::send().
Referenced by LogHostList::preproc_and_try_delete().
int LogHost::set_ipstr_port | ( | char * | ipstr, | |
unsigned int | port | |||
) |
Definition at line 117 of file LogHost.cc.
References ats_strdup, Debug, ink_strlcpy(), IpAddr::load(), name(), and Note.
Referenced by set_name_or_ipstr().
int LogHost::set_name_or_ipstr | ( | char * | name_or_ipstr | ) |
Definition at line 139 of file LogHost.cc.
References ats_ip_check_characters(), ats_ip_parse(), Log::config, ts::ConstBuffer::data(), set_ipstr_port(), set_name_port(), and ts::ConstBuffer::size().
int LogHost::set_name_port | ( | char * | hostname, | |
unsigned int | port | |||
) |
Definition at line 98 of file LogHost.cc.
References ats_strdup, Debug, name(), Note, and port().
Referenced by set_name_or_ipstr().
LogHost::SLINK | ( | LogHost | , | |
failover_link | ||||
) |
friend class LogCollationClientSM [friend] |
Definition at line 39 of file LogHost.h.
Referenced by preproc_and_try_delete().