Database operation interfaces of node. This class takes the place of class "sdbReplicaNode".
More...
#include <client.hpp>
|
| sdbNode () |
| Default constructor.
|
|
| ~sdbNode () |
| Destructor.
|
|
INT32 | connect (sdb &dbConn) |
| Connect to the current node.
|
|
sdbNodeStatus | getStatus () |
| Get status of the current node.
|
|
const CHAR * | getHostName () |
| Get host name of the current node.
|
|
const CHAR * | getServiceName () |
| Get service name of the current node.
|
|
const CHAR * | getNodeName () |
| Get node name of the current node.
|
|
INT32 | getNodeID (INT32 &nodeID) const |
| Get node id of the current node.
|
|
INT32 | stop () |
| Stop the node.
|
|
INT32 | start () |
| Start the node.
|
|
INT32 | setLocation (const CHAR *pLocation) |
| Alter node to set Location.
|
|
INT32 | setAttributes (const bson::BSONObj &options) |
| Alter node.
|
|
Database operation interfaces of node. This class takes the place of class "sdbReplicaNode".
- Note
- We use concept "node" instead of "replica node", and change the class name "sdbReplicaNode" to "sdbNode". class "sdbReplicaNode" will be deprecated in version 2.x.
sdbclient::sdbNode::connect |
( |
sdb & |
dbConn | ) |
|
|
inline |
Connect to the current node.
- Parameters
-
[out] | dbConn | The database obj of current connection |
- Return values
-
SDB_OK | Operation Success |
Others | Operation Fail |
- Deprecated:
- This function is deprecated
const CHAR * sdbclient::sdbNode::getHostName |
( |
| ) |
|
|
inline |
Get host name of the current node.
- Returns
- The host name.
INT32 sdbclient::sdbNode::getNodeID |
( |
INT32 & |
nodeID | ) |
const |
|
inline |
Get node id of the current node.
- Returns
- The node id.
const CHAR * sdbclient::sdbNode::getNodeName |
( |
| ) |
|
|
inline |
Get node name of the current node.
- Returns
- The node name.
CHAR * sdbclient::sdbNode::getServiceName |
( |
| ) |
|
|
inline |
Get service name of the current node.
- Returns
- The service name.
Get status of the current node.
- Returns
- The status of current node.
- Deprecated:
- Since v2.8, the status of node are invalid, never use this api again.
INT32 sdbclient::sdbNode::setAttributes |
( |
const bson::BSONObj & |
options | ) |
|
|
inline |
Alter node.
- Parameters
-
[in] | options | The options of node to be changed, e.g. { "Location": "A" }. Location : The location of node
|
- Return values
-
SDB_OK | Operation Success |
Others | Operation Fail |
INT32 sdbclient::sdbNode::setLocation |
( |
const CHAR * |
pLocation | ) |
|
|
inline |
Alter node to set Location.
- Parameters
-
[in] | pLocation | The location of node to be changed. Location : The location of node, if the parameter is "",
it means to remove the node location
|
- Return values
-
SDB_OK | Operation Success |
Others | Operation Fail |
INT32 sdbclient::sdbNode::start |
( |
| ) |
|
|
inline |
Start the node.
- Return values
-
SDB_OK | Operation Success |
Others | Operation Fail |
INT32 sdbclient::sdbNode::stop |
( |
| ) |
|
|
inline |
Stop the node.
- Return values
-
SDB_OK | Operation Success |
Others | Operation Fail |
sdbclient::sdbNode::pNode |
A pointer of virtual base class _sdbNode
Class sdbNode is a shell for _sdbNode. We use pNode to call the methods in class _sdbNode.
The documentation for this class was generated from the following file: