rasdaman complete source
Public Member Functions | List of all members
RnpClientComm Class Reference

#include <rnpclientcomm.hh>

Inheritance diagram for RnpClientComm:
ClientComm rnp::RnpBaseClientComm

Public Member Functions

 RnpClientComm (const char *rasmgrHost, int rasmgrPort=RASMGRPORT) throw ( r_Error )
 constructor getting the host name of the rasmgr host and it's listening port (default 7001). More...
 
 ~RnpClientComm () throw ()
 
bool effectivTypeIsRNP () throw ()
 
unsigned long getClientID () const
 provides read access to my clientID More...
 
int setTransferFormat (r_Data_Format format, const char *formatParams=NULL)
 set the preferred transfer format More...
 
int setStorageFormat (r_Data_Format format, const char *formatParams=NULL)
 set the preferred storage format More...
 
const char * getServerName ()
 get real server name (the dinamic one, assigned by the RasMGR) More...
 
void setUserIdentification (const char *userName, const char *plainTextPassword)
 user identification for RasMGR More...
 
void setMaxRetry (unsigned int newMaxRetry)
 set maximum retry to get a server More...
 
unsigned int getMaxRetry ()
 get maximum retry to get a server More...
 
void setTurbo (bool turbo)
 
void triggerAliveSignal ()
 triggers an alive signal More...
 
void sendAliveSignal ()
 send an alive signal if necessary and possible More...
 
const char * getExtendedErrorInfo () throw (r_Error)
 get extended error information More...
 
void setTimeoutInterval (int seconds)
 set and get communication timeout interval. Only RNP really uses it More...
 
int getTimeoutInterval ()
 
r_OId createCollection (const char *collName, const char *collTypeName) throw (r_Error)
 
r_OId createMDD (const char *collName, const char *mddTypeName, const char *definitionDomain, const char *tileDomain, bool rcindex=false) throw (r_Error)
 
void extendMDD (r_OId mddOId, const char *stripeDomain, const char *tileDomain) throw (r_Error)
 
vector< r_OIdgetOIdsFromCollection (const char *name) throw ( r_Error )
 
vector< r_OIdgetOIdsFromCollection (const r_OId &oid) throw ( r_Error )
 
vector< r_MintervalgetTileDomains (r_OId mddOId, const char *stripeDomain) throw ( r_Error )
 
void preloadTiles (r_OId mddOId, const char *tileDomain) throw (r_Error)
 
int getTileData (r_OId mddOId, const char *tileDomain, char *&data, bool preallocated=false) throw (r_Error)
 
void replaceTileData (r_OId mddOId, const char *tileDomain, const char *newData, int dataLength, const char *alfaData, int alfaLength) throw (r_Error)
 
int openDB (const char *database)
 open database More...
 
int closeDB ()
 close current database More...
 
int createDB (const char *name) throw (r_Error)
 create a database More...
 
int destroyDB (const char *name) throw (r_Error)
 destroy a database More...
 
int openTA (unsigned short readOnly=0) throw (r_Error)
 begin transaction More...
 
int commitTA () throw (r_Error)
 commit current transaction More...
 
int abortTA ()
 abort current transaction More...
 
void insertMDD (const char *collName, r_GMarray *mar) throw ( r_Error )
 inserts a MDD object in an existing MDD collection on the server More...
 
r_Ref_Any getMDDByOId (const r_OId &oid) throw ( r_Error )
 gets MDD object by oid More...
 
void insertColl (const char *collName, const char *typeName, const r_OId &oid) throw ( r_Error )
 creates an empty MDD collection on the server More...
 
void deleteCollByName (const char *collName) throw ( r_Error )
 deletes an MDD collection by name More...
 
void deleteObjByOId (const r_OId &oid) throw ( r_Error )
 deletes an object by oid (right now, objects are collection only) More...
 
void removeObjFromColl (const char *name, const r_OId &oid) throw ( r_Error )
 removes an object from a collection More...
 
r_Ref_Any getCollByName (const char *name) throw ( r_Error )
 gets collection by name More...
 
r_Ref_Any getCollByOId (const r_OId &oid) throw ( r_Error )
 gets collection by oid More...
 
r_Ref_Any getCollOIdsByName (const char *name) throw ( r_Error )
 gets collection references by name More...
 
r_Ref_Any getCollOIdsByOId (const r_OId &oid) throw ( r_Error )
 gets collection references by oid More...
 
void executeQuery (const r_OQL_Query &query, r_Set< r_Ref_Any > &result) throw ( r_Error )
 query execution More...
 
void executeQuery (const r_OQL_Query &query) throw ( r_Error )
 update execution More...
 
r_OId getNewOId (unsigned short objType) throw (r_Error)
 get new oid More...
 
unsigned short getObjectType (const r_OId &oid) throw (r_Error)
 get oid type More...
 
char * getTypeStructure (const char *typeName, r_Type_Type typeType) throw (r_Error)
 
- Public Member Functions inherited from ClientComm
virtual ~ClientComm () throw ()
 destructor (closes the connection and releases resources) More...
 
const char * getServerName ()
 get real server name (the dinamic one, assigned by the RasMGR) More...
 

Additional Inherited Members

- Public Types inherited from ClientComm
enum  r_Type_Type { r_SetType_Type = 1, r_MDDType_Type = 2 }
 
- Static Public Member Functions inherited from ClientComm
static ClientCommcreateObject (const char *rasmgrName, int rasmgrPort)
 
static void useRNP () throw ()
 
static void useRPC () throw ()
 
static bool internalSettingIsRNP () throw ()
 
static int changeEndianness (r_GMarray *mdd, const r_Base_Type *bt=NULL)
 changes endianness of MDD data More...
 
static int changeEndianness (const r_GMarray *mdd, void *newData, const r_Base_Type *bt=NULL)
 changes the endianness of MDD data and keeps the original untouched More...
 
- Protected Member Functions inherited from ClientComm
 ClientComm () throw ( r_Error )
 constructor getting nothing More...
 

Constructor & Destructor Documentation

RnpClientComm::RnpClientComm ( const char *  rasmgrHost,
int  rasmgrPort = RASMGRPORT 
)
throw (r_Error
)

constructor getting the host name of the rasmgr host and it's listening port (default 7001).

RnpClientComm::~RnpClientComm ( )
throw (
)

Member Function Documentation

int RnpClientComm::abortTA ( )
virtual

abort current transaction

Implements ClientComm.

int RnpClientComm::closeDB ( )
virtual

close current database

Implements ClientComm.

int RnpClientComm::commitTA ( )
throw (r_Error
)
virtual

commit current transaction

Implements ClientComm.

r_OId RnpClientComm::createCollection ( const char *  collName,
const char *  collTypeName 
)
throw (r_Error
)
int RnpClientComm::createDB ( const char *  name)
throw (r_Error
)
virtual

create a database

Implements ClientComm.

r_OId RnpClientComm::createMDD ( const char *  collName,
const char *  mddTypeName,
const char *  definitionDomain,
const char *  tileDomain,
bool  rcindex = false 
)
throw (r_Error
)
void RnpClientComm::deleteCollByName ( const char *  collName)
throw (r_Error
)
virtual

deletes an MDD collection by name

Implements ClientComm.

void RnpClientComm::deleteObjByOId ( const r_OId oid)
throw (r_Error
)
virtual

deletes an object by oid (right now, objects are collection only)

Implements ClientComm.

int RnpClientComm::destroyDB ( const char *  name)
throw (r_Error
)
virtual

destroy a database

Implements ClientComm.

bool RnpClientComm::effectivTypeIsRNP ( )
throw (
)
virtual

Implements ClientComm.

void RnpClientComm::executeQuery ( const r_OQL_Query query,
r_Set< r_Ref_Any > &  result 
)
throw (r_Error
)
virtual

query execution

Implements ClientComm.

void RnpClientComm::executeQuery ( const r_OQL_Query query)
throw (r_Error
)
virtual

update execution

Implements ClientComm.

void RnpClientComm::extendMDD ( r_OId  mddOId,
const char *  stripeDomain,
const char *  tileDomain 
)
throw (r_Error
)
unsigned long RnpClientComm::getClientID ( ) const
virtual

provides read access to my clientID

Implements ClientComm.

r_Ref_Any RnpClientComm::getCollByName ( const char *  name)
throw (r_Error
)
virtual

gets collection by name

Implements ClientComm.

r_Ref_Any RnpClientComm::getCollByOId ( const r_OId oid)
throw (r_Error
)
virtual

gets collection by oid

Implements ClientComm.

r_Ref_Any RnpClientComm::getCollOIdsByName ( const char *  name)
throw (r_Error
)
virtual

gets collection references by name

Implements ClientComm.

r_Ref_Any RnpClientComm::getCollOIdsByOId ( const r_OId oid)
throw (r_Error
)
virtual

gets collection references by oid

Implements ClientComm.

const char* RnpClientComm::getExtendedErrorInfo ( )
throw (r_Error
)
virtual

get extended error information

Implements ClientComm.

unsigned int RnpClientComm::getMaxRetry ( )
virtual

get maximum retry to get a server

Implements ClientComm.

r_Ref_Any RnpClientComm::getMDDByOId ( const r_OId oid)
throw (r_Error
)
virtual

gets MDD object by oid

Implements ClientComm.

r_OId RnpClientComm::getNewOId ( unsigned short  objType)
throw (r_Error
)
virtual

get new oid

Implements ClientComm.

unsigned short RnpClientComm::getObjectType ( const r_OId oid)
throw (r_Error
)
virtual

get oid type

Implements ClientComm.

vector<r_OId> RnpClientComm::getOIdsFromCollection ( const char *  name)
throw (r_Error
)
vector<r_OId> RnpClientComm::getOIdsFromCollection ( const r_OId oid)
throw (r_Error
)
const char* RnpClientComm::getServerName ( )

get real server name (the dinamic one, assigned by the RasMGR)

int RnpClientComm::getTileData ( r_OId  mddOId,
const char *  tileDomain,
char *&  data,
bool  preallocated = false 
)
throw (r_Error
)
vector<r_Minterval> RnpClientComm::getTileDomains ( r_OId  mddOId,
const char *  stripeDomain 
)
throw (r_Error
)
int RnpClientComm::getTimeoutInterval ( )
virtual

Implements ClientComm.

char* RnpClientComm::getTypeStructure ( const char *  typeName,
r_Type_Type  typeType 
)
throw (r_Error
)
virtual

get type structure dallocate using delete []

Implements ClientComm.

void RnpClientComm::insertColl ( const char *  collName,
const char *  typeName,
const r_OId oid 
)
throw (r_Error
)
virtual

creates an empty MDD collection on the server

Implements ClientComm.

void RnpClientComm::insertMDD ( const char *  collName,
r_GMarray mar 
)
throw (r_Error
)
virtual

inserts a MDD object in an existing MDD collection on the server

Implements ClientComm.

int RnpClientComm::openDB ( const char *  database)
virtual

open database

Implements ClientComm.

int RnpClientComm::openTA ( unsigned short  readOnly = 0)
throw (r_Error
)
virtual

begin transaction

Implements ClientComm.

void RnpClientComm::preloadTiles ( r_OId  mddOId,
const char *  tileDomain 
)
throw (r_Error
)
void RnpClientComm::removeObjFromColl ( const char *  name,
const r_OId oid 
)
throw (r_Error
)
virtual

removes an object from a collection

Implements ClientComm.

void RnpClientComm::replaceTileData ( r_OId  mddOId,
const char *  tileDomain,
const char *  newData,
int  dataLength,
const char *  alfaData,
int  alfaLength 
)
throw (r_Error
)
void RnpClientComm::sendAliveSignal ( )
virtual

send an alive signal if necessary and possible

First, it sets the switch { aliveSignalRemaining} saying that an alive signal should be send to the server. Then it calls { sendAliveSignal()} to send it immediately if possible.

Implements ClientComm.

void RnpClientComm::setMaxRetry ( unsigned int  newMaxRetry)
virtual

set maximum retry to get a server

Implements ClientComm.

int RnpClientComm::setStorageFormat ( r_Data_Format  format,
const char *  formatParams = NULL 
)
virtual

set the preferred storage format

Implements ClientComm.

void RnpClientComm::setTimeoutInterval ( int  seconds)
virtual

set and get communication timeout interval. Only RNP really uses it

Implements ClientComm.

int RnpClientComm::setTransferFormat ( r_Data_Format  format,
const char *  formatParams = NULL 
)
virtual

set the preferred transfer format

Implements ClientComm.

void RnpClientComm::setTurbo ( bool  turbo)
void RnpClientComm::setUserIdentification ( const char *  userName,
const char *  plainTextPassword 
)
virtual

user identification for RasMGR

Implements ClientComm.

void RnpClientComm::triggerAliveSignal ( )
virtual

triggers an alive signal

Implements ClientComm.


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