EpcTools
An event based multi-threaded C++ development framework.
Public Member Functions | List of all members
EStatistics::Interface Class Reference

Represents an interface to track peer and message statistics for. More...

#include <estats.h>

Public Member Functions

 Interface (EStatistics::InterfaceId id, EStatistics::ProtocolType protocol, cpStr name)
 Class constructor. More...
 
 Interface (EStatistics::InterfaceId id, EStatistics::ProtocolType protocol, const EString &name)
 Class constructor. More...
 
 Interface (const Interface &i)
 Copy constructor. More...
 
EStatistics::InterfaceId getId ()
 Retrieves the interface ID. More...
 
EStringgetName ()
 Retrieves the interface name. More...
 
ProtocolType getProtocol ()
 Retrieves the interface protocol. More...
 
PeerMapgetPeers ()
 Retrieves the collection of peers for this interface. More...
 
PeergetPeer (const EString &peer, Bool addFlag=True)
 Retrieves the specified peer with option to add if it does not exist. More...
 
PeeraddPeer (const EString &peer)
 Adds the specified peer. More...
 
Void removePeer (const EString &peer)
 Removes the specified peer. More...
 
Void reset ()
 Resets the message counters to zeroes for all peers. More...
 
MessageStatsaddMessageStatsTemplate (EStatistics::MessageId msgid, const EString &name)
 Adds a message to the statistics message template for this interface. More...
 
MessageStatsMapgetMessageStatsTemplate ()
 Retrieves the collection of message statistics. More...
 
UInt incRequestSentErrors (cpStr peer, UInt msgid)
 Increments the request send errors for the specified peer and message. More...
 
UInt incRequestReceivedErrors (cpStr peer, UInt msgid)
 Increments the request receive errors for the specified peer and message. More...
 
UInt incRequestSentOk (cpStr peer, UInt msgid)
 Increments the request send successes for the specified peer and message. More...
 
UInt incRequestReceivedOk (cpStr peer, UInt msgid)
 Increments the request receive successes for the specified peer and message. More...
 
UInt incResponseSentErrors (cpStr peer, UInt msgid)
 Increments the response send errors for the specified peer and message. More...
 
UInt incResponseReceivedErrors (cpStr peer, UInt msgid)
 Increments the response receive errors for the specified peer and message. More...
 
UInt incResponseSentOkAccepted (cpStr peer, UInt msgid)
 Increments the response send success accepted for the specified peer and message. More...
 
UInt incResponseSentOkRejected (cpStr peer, UInt msgid)
 Increments the response send success rejected for the specified peer and message. More...
 
UInt incResponseReceivedOkAccepted (cpStr peer, UInt msgid)
 Increments the response receive success accepted for the specified peer and message. More...
 
UInt incResponseReceivedOkRejected (cpStr peer, UInt msgid)
 Increments the response receive rejected accepted for the specified peer and message. More...
 
UInt incRequestSentErrors (const std::string &peer, UInt msgid)
 Increments the request send errors for the specified peer and message. More...
 
UInt incRequestReceivedErrors (const std::string &peer, UInt msgid)
 Increments the request receive errors for the specified peer and message. More...
 
UInt incRequestSentOk (const std::string &peer, UInt msgid)
 Increments the request send successes for the specified peer and message. More...
 
UInt incRequestReceivedOk (const std::string &peer, UInt msgid)
 Increments the request receive successes for the specified peer and message. More...
 
UInt incResponseSentErrors (const std::string &peer, UInt msgid)
 Increments the response send errors for the specified peer and message. More...
 
UInt incResponseReceivedErrors (const std::string &peer, UInt msgid)
 Increments the response receive errors for the specified peer and message. More...
 
UInt incResponseSentOkAccepted (const std::string &peer, UInt msgid)
 Increments the response send success accepted for the specified peer and message. More...
 
UInt incResponseSentOkRejected (const std::string &peer, Int msgid)
 Increments the response send success rejected for the specified peer and message. More...
 
UInt incResponseReceivedOkAccepted (const std::string &peer, UInt msgid)
 Increments the response receive success accepted for the specified peer and message. More...
 
UInt incResponseReceivedOkRejected (const std::string &peer, UInt msgid)
 Increments the response receive rejected accepted for the specified peer and message. More...
 

Detailed Description

Represents an interface to track peer and message statistics for.

Constructor & Destructor Documentation

◆ Interface() [1/3]

EStatistics::Interface::Interface ( EStatistics::InterfaceId  id,
EStatistics::ProtocolType  protocol,
cpStr  name 
)

Class constructor.

Parameters
idthe interface identifier.
protocolthe interface protocol.
namethe interface name.

◆ Interface() [2/3]

EStatistics::Interface::Interface ( EStatistics::InterfaceId  id,
EStatistics::ProtocolType  protocol,
const EString name 
)

Class constructor.

Parameters
idthe interface identifier.
protocolthe interface protocol.
namethe interface name.

◆ Interface() [3/3]

EStatistics::Interface::Interface ( const Interface i)

Copy constructor.

Parameters
ithe interface to copy.

Member Function Documentation

◆ addMessageStatsTemplate()

EStatistics::MessageStats & EStatistics::Interface::addMessageStatsTemplate ( EStatistics::MessageId  msgid,
const EString name 
)

Adds a message to the statistics message template for this interface.

Returns
the added message statistics template.

◆ addPeer()

EStatistics::Peer & EStatistics::Interface::addPeer ( const EString peer)

Adds the specified peer.

Returns
the added peer.

◆ getId()

EStatistics::InterfaceId EStatistics::Interface::getId ( )
inline

Retrieves the interface ID.

Returns
the interface ID.

◆ getMessageStatsTemplate()

MessageStatsMap& EStatistics::Interface::getMessageStatsTemplate ( )
inline

Retrieves the collection of message statistics.

Returns
the collection of message statistics.

◆ getName()

EString& EStatistics::Interface::getName ( )
inline

Retrieves the interface name.

Returns
the interface name.

◆ getPeer()

EStatistics::Peer & EStatistics::Interface::getPeer ( const EString peer,
Bool  addFlag = True 
)

Retrieves the specified peer with option to add if it does not exist.

Returns
the specified peer object.

◆ getPeers()

PeerMap& EStatistics::Interface::getPeers ( )
inline

Retrieves the collection of peers for this interface.

Returns
the collection of peers for this interface.

◆ getProtocol()

ProtocolType EStatistics::Interface::getProtocol ( )
inline

Retrieves the interface protocol.

Returns
the interface protocol.

◆ incRequestReceivedErrors() [1/2]

UInt EStatistics::Interface::incRequestReceivedErrors ( const std::string &  peer,
UInt  msgid 
)
inline

Increments the request receive errors for the specified peer and message.

Parameters
peerthe associated peer.
msgidthe associated message ID.
Returns
the request receive errors for the specified peer and message.

◆ incRequestReceivedErrors() [2/2]

UInt EStatistics::Interface::incRequestReceivedErrors ( cpStr  peer,
UInt  msgid 
)
inline

Increments the request receive errors for the specified peer and message.

Parameters
peerthe associated peer.
msgidthe associated message ID.
Returns
the request receive errors for the specified peer and message.

◆ incRequestReceivedOk() [1/2]

UInt EStatistics::Interface::incRequestReceivedOk ( const std::string &  peer,
UInt  msgid 
)
inline

Increments the request receive successes for the specified peer and message.

Parameters
peerthe associated peer.
msgidthe associated message ID.
Returns
the request receive successes for the specified peer and message.

◆ incRequestReceivedOk() [2/2]

UInt EStatistics::Interface::incRequestReceivedOk ( cpStr  peer,
UInt  msgid 
)
inline

Increments the request receive successes for the specified peer and message.

Parameters
peerthe associated peer.
msgidthe associated message ID.
Returns
the request receive successes for the specified peer and message.

◆ incRequestSentErrors() [1/2]

UInt EStatistics::Interface::incRequestSentErrors ( const std::string &  peer,
UInt  msgid 
)
inline

Increments the request send errors for the specified peer and message.

Parameters
peerthe associated peer.
msgidthe associated message ID.
Returns
the request send errors for the specified peer and message.

◆ incRequestSentErrors() [2/2]

UInt EStatistics::Interface::incRequestSentErrors ( cpStr  peer,
UInt  msgid 
)
inline

Increments the request send errors for the specified peer and message.

Parameters
peerthe associated peer.
msgidthe associated message ID.
Returns
the request send errors for the specified peer and message.

◆ incRequestSentOk() [1/2]

UInt EStatistics::Interface::incRequestSentOk ( const std::string &  peer,
UInt  msgid 
)
inline

Increments the request send successes for the specified peer and message.

Parameters
peerthe associated peer.
msgidthe associated message ID.
Returns
the request send successes for the specified peer and message.

◆ incRequestSentOk() [2/2]

UInt EStatistics::Interface::incRequestSentOk ( cpStr  peer,
UInt  msgid 
)
inline

Increments the request send successes for the specified peer and message.

Parameters
peerthe associated peer.
msgidthe associated message ID.
Returns
the request send successes for the specified peer and message.

◆ incResponseReceivedErrors() [1/2]

UInt EStatistics::Interface::incResponseReceivedErrors ( const std::string &  peer,
UInt  msgid 
)
inline

Increments the response receive errors for the specified peer and message.

Parameters
peerthe associated peer.
msgidthe associated message ID.
Returns
the response receive errors for the specified peer and message.

◆ incResponseReceivedErrors() [2/2]

UInt EStatistics::Interface::incResponseReceivedErrors ( cpStr  peer,
UInt  msgid 
)
inline

Increments the response receive errors for the specified peer and message.

Parameters
peerthe associated peer.
msgidthe associated message ID.
Returns
the response receive errors for the specified peer and message.

◆ incResponseReceivedOkAccepted() [1/2]

UInt EStatistics::Interface::incResponseReceivedOkAccepted ( const std::string &  peer,
UInt  msgid 
)
inline

Increments the response receive success accepted for the specified peer and message.

Parameters
peerthe associated peer.
msgidthe associated message ID.
Returns
the response send receive accepted for the specified peer and message.

◆ incResponseReceivedOkAccepted() [2/2]

UInt EStatistics::Interface::incResponseReceivedOkAccepted ( cpStr  peer,
UInt  msgid 
)
inline

Increments the response receive success accepted for the specified peer and message.

Parameters
peerthe associated peer.
msgidthe associated message ID.
Returns
the response send receive accepted for the specified peer and message.

◆ incResponseReceivedOkRejected() [1/2]

UInt EStatistics::Interface::incResponseReceivedOkRejected ( const std::string &  peer,
UInt  msgid 
)
inline

Increments the response receive rejected accepted for the specified peer and message.

Parameters
peerthe associated peer.
msgidthe associated message ID.
Returns
the response send receive rejected for the specified peer and message.

◆ incResponseReceivedOkRejected() [2/2]

UInt EStatistics::Interface::incResponseReceivedOkRejected ( cpStr  peer,
UInt  msgid 
)
inline

Increments the response receive rejected accepted for the specified peer and message.

Parameters
peerthe associated peer.
msgidthe associated message ID.
Returns
the response send receive rejected for the specified peer and message.

◆ incResponseSentErrors() [1/2]

UInt EStatistics::Interface::incResponseSentErrors ( const std::string &  peer,
UInt  msgid 
)
inline

Increments the response send errors for the specified peer and message.

Parameters
peerthe associated peer.
msgidthe associated message ID.
Returns
the response send errors for the specified peer and message.

◆ incResponseSentErrors() [2/2]

UInt EStatistics::Interface::incResponseSentErrors ( cpStr  peer,
UInt  msgid 
)
inline

Increments the response send errors for the specified peer and message.

Parameters
peerthe associated peer.
msgidthe associated message ID.
Returns
the response send errors for the specified peer and message.

◆ incResponseSentOkAccepted() [1/2]

UInt EStatistics::Interface::incResponseSentOkAccepted ( const std::string &  peer,
UInt  msgid 
)
inline

Increments the response send success accepted for the specified peer and message.

Parameters
peerthe associated peer.
msgidthe associated message ID.
Returns
the response send success accepted for the specified peer and message.

◆ incResponseSentOkAccepted() [2/2]

UInt EStatistics::Interface::incResponseSentOkAccepted ( cpStr  peer,
UInt  msgid 
)
inline

Increments the response send success accepted for the specified peer and message.

Parameters
peerthe associated peer.
msgidthe associated message ID.
Returns
the response send success accepted for the specified peer and message.

◆ incResponseSentOkRejected() [1/2]

UInt EStatistics::Interface::incResponseSentOkRejected ( const std::string &  peer,
Int  msgid 
)
inline

Increments the response send success rejected for the specified peer and message.

Parameters
peerthe associated peer.
msgidthe associated message ID.
Returns
the response send success rejected for the specified peer and message.

◆ incResponseSentOkRejected() [2/2]

UInt EStatistics::Interface::incResponseSentOkRejected ( cpStr  peer,
UInt  msgid 
)
inline

Increments the response send success rejected for the specified peer and message.

Parameters
peerthe associated peer.
msgidthe associated message ID.
Returns
the response send success rejected for the specified peer and message.

◆ removePeer()

Void EStatistics::Interface::removePeer ( const EString peer)

Removes the specified peer.

◆ reset()

Void EStatistics::Interface::reset ( )

Resets the message counters to zeroes for all peers.


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