SequoiaDB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Public Attributes | List of all members
sdbclient::sdbDomain Class Reference

Database operation interfaces of domain. More...

#include <client.hpp>

Public Member Functions

 sdbDomain ()
 Default constructor.
 
 ~sdbDomain ()
 Destructor.
 
const CHAR * getName ()
 Get the name of current domain.
 
INT32 alterDomain (const bson::BSONObj &options)
 Alter the current domain.
 
INT32 addGroups (const bson::BSONObj &options)
 Add groups into the current domain.
 
INT32 setGroups (const bson::BSONObj &options)
 Set the groups of the current domain.
 
INT32 removeGroups (const bson::BSONObj &options)
 Remove groups from the current domain.
 
INT32 setAttributes (const bson::BSONObj &options)
 Alter the current domain.
 
INT32 listCollectionSpacesInDomain (sdbCursor &cursor)
 List all the collection spaces in current domain.
 
INT32 listCollectionsInDomain (sdbCursor &cursor)
 List all the collections in current domain.
 
INT32 listReplicaGroupInDomain (sdbCursor &cursor)
 List all the replicagroup in current domain.
 

Public Attributes

_sdbDomain * pDomain
 

Detailed Description

Database operation interfaces of domain.

Member Function Documentation

INT32 sdbclient::sdbDomain::addGroups ( const bson::BSONObj &  options)
inline

Add groups into the current domain.

Parameters
[in]optionsThe options user wants to alter
Groups:    The list of replica groups' names to be added into the domain.
           eg: { "Groups": [ "group1", "group2", "group3" ] }, it means that domain
           changes to add "group1" "group2" or "group3".
Return values
SDB_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbDomain::alterDomain ( const bson::BSONObj &  options)
inline

Alter the current domain.

Parameters
[in]optionsThe options user wants to alter
Groups:    The list of replica groups' names which the domain is going to contain.
           eg: { "Groups": [ "group1", "group2", "group3" ] }, it means that domain
           changes to contain "group1" "group2" or "group3".
           We can add or remove groups in current domain. However, if a group has data
           in it, remove it out of domain will be failing.
AutoSplit: Alter current domain to have the ability of automatically split or not.
           If this option is set to be true, while creating collection(ShardingType is "hash") in this domain,
           the data of this collection will be split(hash split) into all the groups in this domain automatically.
           However, it won't automatically split data into those groups which were add into this domain later.
           eg: { "Groups": [ "group1", "group2", "group3" ], "AutoSplit: true" }
Return values
SDB_OKOperation Success
OthersOperation Fail
const CHAR * sdbclient::sdbDomain::getName ( )
inline

Get the name of current domain.

Return values
Thename of current domain or null if fail
INT32 sdbclient::sdbDomain::listCollectionsInDomain ( sdbCursor cursor)
inline

List all the collections in current domain.

Parameters
[in]cHandleThe domain handle
[out]cursorThe sdbCursor object of result
Return values
SDB_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbDomain::listCollectionSpacesInDomain ( sdbCursor cursor)
inline

List all the collection spaces in current domain.

Parameters
[in]cHandleThe domain handle
[out]cursorThe sdbCursor object of result
Return values
SDB_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbDomain::listReplicaGroupInDomain ( sdbCursor cursor)
inline

List all the replicagroup in current domain.

Parameters
[out]cursorThe curosr reference of the result
Return values
SDB_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbDomain::removeGroups ( const bson::BSONObj &  options)
inline

Remove groups from the current domain.

Parameters
[in]optionsThe options user wants to alter
Groups:    The list of replica groups' names which the domain is going to remove.
           eg: { "Groups": [ "group1", "group2", "group3" ] }, it means that domain
           changes to remove "group1" "group2" or "group3".
           If a group has data in it, remove it out of domain will be failing.
Return values
SDB_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbDomain::setAttributes ( const bson::BSONObj &  options)
inline

Alter the current domain.

Parameters
[in]optionsThe options user wants to alter
Groups:    The list of replica groups' names which the domain is going to contain.
           eg: { "Groups": [ "group1", "group2", "group3" ] }, it means that domain
           changes to contain "group1" "group2" or "group3".
           We can add or remove groups in current domain. However, if a group has data
           in it, remove it out of domain will be failing.
AutoSplit: Alter current domain to have the ability of automatically split or not.
           If this option is set to be true, while creating collection(ShardingType is "hash") in this domain,
           the data of this collection will be split(hash split) into all the groups in this domain automatically.
           However, it won't automatically split data into those groups which were add into this domain later.
           eg: { "Groups": [ "group1", "group2", "group3" ], "AutoSplit: true" }
Return values
SDB_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbDomain::setGroups ( const bson::BSONObj &  options)
inline

Set the groups of the current domain.

Parameters
[in]optionsThe options user wants to alter
Groups:    The list of replica groups' names which the domain is going to contain.
           eg: { "Groups": [ "group1", "group2", "group3" ] }, it means that domain
           changes to contain "group1" "group2" or "group3".
           We can add or remove groups in current domain. However, if a group has data
           in it, remove it out of domain will be failing.
Return values
SDB_OKOperation Success
OthersOperation Fail

Member Data Documentation

sdbclient::sdbDomain::pDomain

A pointer of virtual base class _sdbDomain

Class sdbDomain is a shell for _sdbDomain. We use pDomain to call the methods in class _sdbDomain.


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