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

Database operation interfaces of data center. More...

#include <client.hpp>

Public Member Functions

 sdbDataCenter ()
 Default constructor.
 
 ~sdbDataCenter ()
 Destructor.
 
const CHAR * getName ()
 Get the name of current data center.
 
INT32 getDetail (bson::BSONObj &retInfo)
 Get the detail of current data center.
 
INT32 activateDC ()
 Activate the data center.
 
INT32 deactivateDC ()
 Deactivate the data center.
 
INT32 enableReadOnly (BOOLEAN isReadOnly)
 Enable data center works in readonly mode or not.
 
INT32 createImage (const CHAR *pCataAddrList)
 Create image in data center.
 
INT32 removeImage ()
 Remove image in data center.
 
INT32 enableImage ()
 Enable image in data center.
 
INT32 disableImage ()
 Disable image in data center.
 
INT32 attachGroups (const bson::BSONObj &info)
 Attach specified groups to data center.
 
INT32 detachGroups (const bson::BSONObj &info)
 Detach specified groups from data center.
 

Public Attributes

_sdbDataCenterpDC
 

Detailed Description

Database operation interfaces of data center.

Member Function Documentation

INT32 sdbclient::sdbDataCenter::activateDC ( )
inline

Activate the data center.

Return values
SDB_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbDataCenter::attachGroups ( const bson::BSONObj &  info)
inline

Attach specified groups to data center.

Parameters
[in]infoThe information of groups to attach, e.g. {Groups:[["a", "a"], ["b", "b"]]}
Return values
SDB_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbDataCenter::createImage ( const CHAR *  pCataAddrList)
inline

Create image in data center.

Parameters
[in]pCataAddrListCatalog address list of remote data center, e.g. "192.168.20.165:30003", "192.168.20.165:30003,192.168.20.166:30003"
Return values
SDB_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbDataCenter::deactivateDC ( )
inline

Deactivate the data center.

Return values
SDB_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbDataCenter::detachGroups ( const bson::BSONObj &  info)
inline

Detach specified groups from data center.

Parameters
[in]infoThe information of groups to detach, e.g. {Groups:[["a", "a"], ["b", "b"]]}
Return values
SDB_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbDataCenter::disableImage ( )
inline

Disable image in data center.

Return values
SDB_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbDataCenter::enableImage ( )
inline

Enable image in data center.

Return values
SDB_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbDataCenter::enableReadOnly ( BOOLEAN  isReadOnly)
inline

Enable data center works in readonly mode or not.

Parameters
[in]isReadOnlyWhether to use readonly mode or not
Return values
SDB_OKOperation Success
OthersOperation Fail
INT32 sdbclient::sdbDataCenter::getDetail ( bson::BSONObj &  retInfo)
inline

Get the detail of current data center.

Parameters
[out]retInfoThe detail of data center
Return values
SDB_OKOperation Success
OthersOperation Fail
const CHAR * sdbclient::sdbDataCenter::getName ( )
inline

Get the name of current data center.

Return values
Thename of current data center or null if fail
INT32 sdbclient::sdbDataCenter::removeImage ( )
inline

Remove image in data center.

Return values
SDB_OKOperation Success
OthersOperation Fail

Member Data Documentation

sdbclient::sdbDataCenter::pDC

A pointer of virtual base class _sdbDataCenter

Class sdbDataCenter is a shell for _sdbDataCenter. We use pDC to call the methods in class _sdbDataCenter.


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