Database operation interfaces of replica group. More...
Public Member Functions | |
bool | Stop () |
Stop the current node. | |
bool | Start () |
Start the current node. | |
int | GetNodeNum (SDBConst.NodeStatus status) |
Get the count of node with given status. | |
BsonDocument | GetDetail () |
Get the detail information of current group. | |
Node | CreateNode (string hostName, int port, string dbpath, Dictionary< string, string > map) |
Create the replica node. | |
Node | CreateNode (string hostName, int port, string dbpath, BsonDocument configure) |
Create the replica node. | |
void | RemoveNode (string hostName, int port, BsonDocument configure) |
Remove the specified replica node. | |
Node | GetMaster () |
Get the master node of current group. | |
Node | GetSlave () |
Get the slave node, when have no slave node, return master node. | |
Node | GetSlave (params int[] positions) |
Get the slave node in the specified positions, when have no slave node in the specified positions, return master node. | |
Node | GetSlave (IList< int > positions) |
Get the slave node in the specified positions, when have no slave node in the specified positions, return master node. | |
bool | IsNodeExist (string nodeName) |
Whether the specified node exists in current group or not. | |
bool | IsNodeExist (string hostName, int port) |
Whether the specified node exists in current group or not. | |
Node | GetNode (string nodeName) |
Get the node by node name. | |
Node | GetNode (string hostName, int port) |
Get the node by host name and port. | |
void | AttachNode (string hostName, int port, BsonDocument options) |
Attach a node to the group. | |
void | DetachNode (string hostName, int port, BsonDocument options) |
Detach a node from the group. | |
Properties | |
Sequoiadb | SequoiaDB [get] |
Return the sequoiadb handle of current group. | |
string | GroupName [get] |
Return the name of current group. | |
int | GroupID [get] |
Return the group ID of current group. | |
bool | IsCatalog [get] |
Verify the role of current group. | |
Database operation interfaces of replica group.
|
inline |
Attach a node to the group.
hostName | The host name of node. |
port | The port for the node. |
options | configuration for this operation, can not be null or empty, can be the follow options:
|
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Create the replica node.
hostName | The host name of node |
port | The port of node |
dbpath | The database path of node |
map | The other configure information of node |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Create the replica node.
hostName | The host name of node |
port | The port of node |
dbpath | The database path of node |
configure | The other configure information of node |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Detach a node from the group.
hostName | The host name of node. |
port | The port for the node. |
options | configuration for this operation, can not be null or empty, can be the follow options:
|
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Get the detail information of current group.
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Get the master node of current group.
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Get the node by node name.
nodeName | The node name |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Get the node by host name and port.
hostName | The host name |
port | The port |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Get the count of node with given status.
status | The specified status as below: SDB_NODE_ALL SDB_NODE_ACTIVE SDB_NODE_INACTIVE SDB_NODE_UNKNOWN |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Get the slave node, when have no slave node, return master node.
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Get the slave node in the specified positions, when have no slave node in the specified positions, return master node.
positions | The positions of nodes. The position of a node is depended on the index of the node defined in catalog. But the beginning position of a node is start from 1 instead of 0, so it can be 1-7. |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Get the slave node in the specified positions, when have no slave node in the specified positions, return master node.
positions | The positions of nodes. The position of a node is depended on the index of the node defined in catalog. But the beginning position of a node is start from 1 instead of 0, so it can be 1-7. |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Whether the specified node exists in current group or not.
nodeName | The name of the node. e.g. "192.168.20.165:20000" |
|
inline |
Whether the specified node exists in current group or not.
hostName | The hostname of the node. |
port | The port of the node. |
|
inline |
Remove the specified replica node.
hostName | The host name of node |
port | The port of node |
configure | The configurations for the replica node |
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Start the current node.
SequoiaDB.BaseException | |
System.Exception |
|
inline |
Stop the current node.
SequoiaDB.BaseException | |
System.Exception |
|
get |
Return the group ID of current group.
|
get |
Return the name of current group.
|
get |
Verify the role of current group.
|
get |
Return the sequoiadb handle of current group.