Hazelcast C++ Client
Hazelcast C++ Client Library
hazelcast::client::address Class Reference

Represents an address of a client or member in the cluster. More...

#include <address.h>

Public Member Functions

 address (std::string hostname, int port, unsigned long scope_id)
 
 address ()
 Constructor.
 
 address (std::string url, int port)
 
bool operator== (const address &address) const
 
bool operator!= (const address &address) const
 
int get_port () const
 
bool is_ip_v4 () const
 
const std::string & get_host () const
 
unsigned long get_scope_id () const
 
bool operator< (const address &rhs) const
 
std::string to_string () const
 

Static Public Attributes

static constexpr int ID = 0
 

Friends

struct serialization::hz_serializer< address >
 
struct std::hash< hazelcast::client::address >
 

Detailed Description

Represents an address of a client or member in the cluster.

Definition at line 36 of file address.h.

Member Function Documentation

◆ get_host()

const std::string & hazelcast::client::address::get_host ( ) const
Returns
host address as string

Definition at line 425 of file client_impl.cpp.

425  {
426  return host_;
427  }

◆ get_port()

int hazelcast::client::address::get_port ( ) const
Returns
port number.

Definition at line 421 of file client_impl.cpp.

421  {
422  return port_;
423  }

◆ is_ip_v4()

bool hazelcast::client::address::is_ip_v4 ( ) const
Returns
true if the address is ip V4 address, false otherwise.

Definition at line 445 of file client_impl.cpp.

445  {
446  return type_ == IPV4;
447  }

◆ operator!=()

bool hazelcast::client::address::operator!= ( const address address) const
Parameters
addressto be compared.

Definition at line 417 of file client_impl.cpp.

417  {
418  return !(*this == rhs);
419  }

◆ operator==()

bool hazelcast::client::address::operator== ( const address address) const
Parameters
addressto be compared.

Definition at line 413 of file client_impl.cpp.

413  {
414  return rhs.port_ == port_ && rhs.type_ == type_ && 0 == rhs.host_.compare(host_);
415  }

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