|
Couchbase C++ SDK 1.4.0 (rev. 59aa900)
|
Identifies a cluster node. More...
#include <couchbase/node_id.hxx>
Public Member Functions | |
| node_id ()=default | |
| Creates an empty (invalid) node_id. | |
| node_id (const node_id &)=default | |
| node_id (node_id &&) noexcept=default | |
| auto | operator= (const node_id &) -> node_id &=default |
| auto | operator= (node_id &&) noexcept -> node_id &=default |
| ~node_id ()=default | |
| auto | id () const noexcept -> const std::string & |
| User-facing identifier string. | |
| auto | node_uuid () const noexcept -> const std::string & |
| The server-assigned node UUID (empty on servers before 8.0.1). | |
| auto | hostname () const noexcept -> const std::string & |
| The hostname of the node. | |
| auto | port () const noexcept -> std::uint16_t |
| The port of the node's key-value service. | |
| operator bool () const noexcept | |
| Returns true when the node_id was properly initialized (not default-constructed). | |
| auto | operator== (const node_id &other) const noexcept -> bool |
| auto | operator!= (const node_id &other) const noexcept -> bool |
| auto | operator< (const node_id &other) const noexcept -> bool |
| auto | operator<= (const node_id &other) const noexcept -> bool |
| auto | operator> (const node_id &other) const noexcept -> bool |
| auto | operator>= (const node_id &other) const noexcept -> bool |
Friends | |
| class | internal_node_id |
Identifies a cluster node.
On Couchbase Server 8.0.1+ the identifier is the server-assigned node UUID. On older releases, a stable opaque token is derived from the node's hostname and KV port.
The type is equality-comparable, totally ordered, and hashable.
|
default |
Creates an empty (invalid) node_id.
|
default |
|
defaultnoexcept |
|
default |
|
nodiscardnoexcept |
The hostname of the node.
|
nodiscardnoexcept |
User-facing identifier string.
Returns node_uuid when the server provides one, otherwise a stable hex-encoded hash derived from hostname and KV port.
|
nodiscardnoexcept |
The server-assigned node UUID (empty on servers before 8.0.1).
|
explicitnodiscardnoexcept |
Returns true when the node_id was properly initialized (not default-constructed).
|
nodiscardnoexcept |
|
nodiscardnoexcept |
|
nodiscardnoexcept |
|
nodiscardnoexcept |
|
nodiscardnoexcept |
|
nodiscardnoexcept |
|
nodiscardnoexcept |
The port of the node's key-value service.
This reflects the port actually used by the client: the TLS port when the cluster connection is TLS-enabled, otherwise the plain port. A value of 0 indicates the port is unknown or the node is not bound; in that case operator bool() also returns false.
|
friend |