rasdaman complete source
|
#include <rnpclientcomm.hh>
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_OId > | getOIdsFromCollection (const char *name) throw ( r_Error ) |
vector< r_OId > | getOIdsFromCollection (const r_OId &oid) throw ( r_Error ) |
vector< r_Minterval > | getTileDomains (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) |
![]() | |
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 | |
![]() | |
enum | r_Type_Type { r_SetType_Type = 1, r_MDDType_Type = 2 } |
![]() | |
static ClientComm * | createObject (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... | |
![]() | |
ClientComm () throw ( r_Error ) | |
constructor getting nothing More... | |
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 | ( | |||
) |
|
virtual |
abort current transaction
Implements ClientComm.
|
virtual |
close current database
Implements ClientComm.
|
virtual |
commit current transaction
Implements ClientComm.
r_OId RnpClientComm::createCollection | ( | const char * | collName, |
const char * | collTypeName | ||
) | |||
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 | |
) |
|
virtual |
deletes an MDD collection by name
Implements ClientComm.
deletes an object by oid (right now, objects are collection only)
Implements ClientComm.
|
virtual |
destroy a database
Implements ClientComm.
|
virtual |
Implements ClientComm.
|
virtual |
query execution
Implements ClientComm.
|
virtual |
update execution
Implements ClientComm.
void RnpClientComm::extendMDD | ( | r_OId | mddOId, |
const char * | stripeDomain, | ||
const char * | tileDomain | ||
) | |||
throw | ( | r_Error | |
) |
|
virtual |
provides read access to my clientID
Implements ClientComm.
gets collection by name
Implements ClientComm.
gets collection by oid
Implements ClientComm.
gets collection references by name
Implements ClientComm.
gets collection references by oid
Implements ClientComm.
|
virtual |
get extended error information
Implements ClientComm.
|
virtual |
get maximum retry to get a server
Implements ClientComm.
gets MDD object by oid
Implements ClientComm.
get new oid
Implements ClientComm.
get oid type
Implements ClientComm.
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 | |
) |
|
virtual |
Implements ClientComm.
|
virtual |
get type structure dallocate using delete []
Implements ClientComm.
|
virtual |
creates an empty MDD collection on the server
Implements ClientComm.
inserts a MDD object in an existing MDD collection on the server
Implements ClientComm.
|
virtual |
open database
Implements ClientComm.
|
virtual |
begin transaction
Implements ClientComm.
|
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 | |
) |
|
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.
|
virtual |
set maximum retry to get a server
Implements ClientComm.
|
virtual |
set the preferred storage format
Implements ClientComm.
|
virtual |
set and get communication timeout interval. Only RNP really uses it
Implements ClientComm.
|
virtual |
set the preferred transfer format
Implements ClientComm.
void RnpClientComm::setTurbo | ( | bool | turbo | ) |
|
virtual |
user identification for RasMGR
Implements ClientComm.
|
virtual |
triggers an alive signal
Implements ClientComm.