Wiretap API  <small>Wiretap 2021</small>
WireTapNodeId Class Reference

This class contains a persistent identifier for a node in a database exposed by a Wiretap server. More...

Public Member Functions

const char * id () const
 Gets the persistent identifier for a node which is unique for a particular Wiretap server on a particular host. More...
 
bool operator< (const WireTapNodeId &) const
 
WireTapNodeIdoperator= (const WireTapNodeId &src)
 Default assignment operator. Returns a reference to the source object. More...
 
bool operator== (const WireTapNodeId &) const
 
void setId (const char *idString)
 Sets the persistent identifier for a node which is unique for a particular Wiretap server on a particular host. More...
 
 WireTapNodeId (const char *idString="")
 Constructs a new WireTapNodeId object using a string or, if no string is specified, using an empty string. More...
 
 WireTapNodeId (const WireTapStr &idObject)
 Constructs a new WireTapNodeId object using a reference to a WireTapStr object. More...
 
 WireTapNodeId (const WireTapNodeId &nodeId)
 Copy constructor. More...
 
virtual ~WireTapNodeId ()
 Destructor. More...
 

Detailed Description

This class contains a persistent identifier for a node in a database exposed by a Wiretap server.

The persistent identifier should be unique in the context of a particular instance of a particular Wiretap server. Each Wiretap server implementation is responsible for ensuring node IDs are unique.

WireTapNodeHandle uses the combination of this class (WireTapNodeId) and WireTapServerHandle to uniquely refer to a node.

Wiretap clients can store this ID in their own data structure for future reference. If there is a possibility that storage devices (on which nodes are located) will be switched from one Wiretap host to another, Wiretap clients should also retain the storage ID of the Wiretap server from which the client originally obtained an instance of WireTapNodeHandle for the node. See WireTapServerInfo.getStorageId.

See also
WireTapNodeHandle and WireTapServerHandle.

Constructor & Destructor Documentation

◆ WireTapNodeId() [1/3]

WireTapNodeId::WireTapNodeId ( const char *  idString = "")

Constructs a new WireTapNodeId object using a string or, if no string is specified, using an empty string.

Normally, only Wiretap servers call this constructor.

Parameters
idStringAn input parameter. A string that is a persistent identifier for the node that is unique in the context of an instance of a particular Wiretap server.

◆ WireTapNodeId() [2/3]

WireTapNodeId::WireTapNodeId ( const WireTapStr idObject)

Constructs a new WireTapNodeId object using a reference to a WireTapStr object.

Normally, only Wiretap servers call this constructor.

Parameters
idObjectAn input parameter. A WireTapStr object that contains a a persistent identifier for the node that is unique in the context of an instance of a particular Wiretap server.

◆ WireTapNodeId() [3/3]

WireTapNodeId::WireTapNodeId ( const WireTapNodeId nodeId)

Copy constructor.

Constructs a new WireTapNodeId object that duplicates the content of the original.

Parameters
nodeIdAn input parameter. The WiretapNodeId object that is to be copied.

◆ ~WireTapNodeId()

virtual WireTapNodeId::~WireTapNodeId ( )
virtual

Destructor.

Member Function Documentation

◆ id()

const char* WireTapNodeId::id ( ) const

Gets the persistent identifier for a node which is unique for a particular Wiretap server on a particular host.

Returns
A string that contains the persistent identifier for the node.

◆ operator<()

bool WireTapNodeId::operator< ( const WireTapNodeId ) const

◆ operator=()

WireTapNodeId& WireTapNodeId::operator= ( const WireTapNodeId src)

Default assignment operator. Returns a reference to the source object.

Parameters
srcAn input parameter. The WireTapNodeId object to which the reference should point.

◆ operator==()

bool WireTapNodeId::operator== ( const WireTapNodeId ) const

◆ setId()

void WireTapNodeId::setId ( const char *  idString)

Sets the persistent identifier for a node which is unique for a particular Wiretap server on a particular host.

Parameters
idStringAn input parameter. A string that contains the persistent identifier for the node. The id should be unique among the nodes for an instance of a particular Wiretap server on a particular host. This parameter cannot be NULL.

The following are not legal in a node ID:

  • space
  • comma
  • new line
  • tab
  • quote (single and double)

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