rasdaman complete source
|
#include <clientcomm.hh>
Public Member Functions | |
virtual | ~ClientComm () throw () |
destructor (closes the connection and releases resources) More... | |
virtual bool | effectivTypeIsRNP ()=0 throw () |
virtual unsigned long | getClientID () const =0 |
provides read access to my clientID More... | |
virtual int | openDB (const char *database)=0 |
open database More... | |
virtual int | closeDB ()=0 |
close current database More... | |
virtual int | createDB (const char *name)=0 throw (r_Error) |
create a database More... | |
virtual int | destroyDB (const char *name)=0 throw (r_Error) |
destroy a database More... | |
virtual int | openTA (unsigned short readOnly=0)=0 throw (r_Error) |
begin transaction More... | |
virtual int | commitTA ()=0 throw (r_Error) |
commit current transaction More... | |
virtual int | abortTA ()=0 |
abort current transaction More... | |
virtual void | insertMDD (const char *collName, r_GMarray *mar)=0 throw ( r_Error ) |
inserts a MDD object in an existing MDD collection on the server More... | |
virtual r_Ref_Any | getMDDByOId (const r_OId &oid)=0 throw ( r_Error ) |
gets MDD object by oid More... | |
virtual void | insertColl (const char *collName, const char *typeName, const r_OId &oid)=0 throw ( r_Error ) |
creates an empty MDD collection on the server More... | |
virtual void | deleteCollByName (const char *collName)=0 throw ( r_Error ) |
deletes an MDD collection by name More... | |
virtual void | deleteObjByOId (const r_OId &oid)=0 throw ( r_Error ) |
deletes an object by oid (right now, objects are collection only) More... | |
virtual void | removeObjFromColl (const char *name, const r_OId &oid)=0 throw ( r_Error ) |
removes an object from a collection More... | |
virtual r_Ref_Any | getCollByName (const char *name)=0 throw ( r_Error ) |
gets collection by name More... | |
virtual r_Ref_Any | getCollByOId (const r_OId &oid)=0 throw ( r_Error ) |
gets collection by oid More... | |
virtual r_Ref_Any | getCollOIdsByName (const char *name)=0 throw ( r_Error ) |
gets collection references by name More... | |
virtual r_Ref_Any | getCollOIdsByOId (const r_OId &oid)=0 throw ( r_Error ) |
gets collection references by oid More... | |
virtual void | executeQuery (const r_OQL_Query &query, r_Set< r_Ref_Any > &result)=0 throw ( r_Error ) |
query execution More... | |
virtual void | executeQuery (const r_OQL_Query &query)=0 throw ( r_Error ) |
update execution More... | |
virtual void | triggerAliveSignal ()=0 |
triggers an alive signal More... | |
virtual void | sendAliveSignal ()=0 |
send an alive signal if necessary and possible More... | |
virtual int | setTransferFormat (r_Data_Format format, const char *formatParams=NULL)=0 |
set the preferred transfer format More... | |
virtual int | setStorageFormat (r_Data_Format format, const char *formatParams=NULL)=0 |
set the preferred storage format More... | |
virtual const char * | getExtendedErrorInfo ()=0 throw (r_Error) |
get extended error information More... | |
const char * | getServerName () |
get real server name (the dinamic one, assigned by the RasMGR) More... | |
virtual void | setUserIdentification (const char *userName, const char *plainTextPassword)=0 |
user identification for RasMGR More... | |
virtual void | setMaxRetry (unsigned int newMaxRetry)=0 |
set maximum retry to get a server More... | |
virtual unsigned int | getMaxRetry ()=0 |
get maximum retry to get a server More... | |
virtual void | setTimeoutInterval (int seconds)=0 |
set and get communication timeout interval. Only RNP really uses it More... | |
virtual int | getTimeoutInterval ()=0 |
Static Public Member Functions | |
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... | |
Protected Member Functions | |
ClientComm () throw ( r_Error ) | |
constructor getting nothing More... | |
enum | r_Type_Type { r_SetType_Type = 1, r_MDDType_Type = 2 } |
virtual r_OId | getNewOId (unsigned short objType)=0 throw (r_Error) |
get new oid More... | |
virtual unsigned short | getObjectType (const r_OId &oid)=0 throw (r_Error) |
get oid type More... | |
virtual char * | getTypeStructure (const char *typeName, r_Type_Type typeType)=0 throw (r_Error) |
get type structure deallocate using delete [] More... | |
|
virtual |
destructor (closes the connection and releases resources)
|
protected |
constructor getting nothing
|
pure virtual |
abort current transaction
Implemented in RpcClientComm, and RnpClientComm.
|
static |
changes endianness of MDD data
|
static |
changes the endianness of MDD data and keeps the original untouched
|
pure virtual |
close current database
Implemented in RpcClientComm, and RnpClientComm.
|
pure virtual |
commit current transaction
Implemented in RpcClientComm, and RnpClientComm.
|
pure virtual |
create a database
Implemented in RpcClientComm, and RnpClientComm.
|
static |
|
pure virtual |
deletes an MDD collection by name
Implemented in RpcClientComm, and RnpClientComm.
deletes an object by oid (right now, objects are collection only)
Implemented in RpcClientComm, and RnpClientComm.
|
pure virtual |
destroy a database
Implemented in RpcClientComm, and RnpClientComm.
|
pure virtual |
Implemented in RpcClientComm, and RnpClientComm.
|
pure virtual |
query execution
Implemented in RpcClientComm, and RnpClientComm.
|
pure virtual |
update execution
Implemented in RpcClientComm, and RnpClientComm.
|
pure virtual |
provides read access to my clientID
Implemented in RpcClientComm, and RnpClientComm.
gets collection by name
Implemented in RpcClientComm, and RnpClientComm.
gets collection by oid
Implemented in RpcClientComm, and RnpClientComm.
gets collection references by name
Implemented in RpcClientComm, and RnpClientComm.
gets collection references by oid
Implemented in RpcClientComm, and RnpClientComm.
|
pure virtual |
get extended error information
Implemented in RpcClientComm, and RnpClientComm.
|
pure virtual |
get maximum retry to get a server
Implemented in RpcClientComm, and RnpClientComm.
gets MDD object by oid
Implemented in RpcClientComm, and RnpClientComm.
get new oid
Implemented in RpcClientComm, and RnpClientComm.
get oid type
Implemented in RpcClientComm, and RnpClientComm.
const char* ClientComm::getServerName | ( | ) |
get real server name (the dinamic one, assigned by the RasMGR)
|
pure virtual |
Implemented in RpcClientComm, and RnpClientComm.
|
pure virtual |
get type structure deallocate using delete []
Implemented in RpcClientComm, and RnpClientComm.
|
pure virtual |
creates an empty MDD collection on the server
Implemented in RpcClientComm, and RnpClientComm.
|
pure virtual |
inserts a MDD object in an existing MDD collection on the server
Implemented in RpcClientComm, and RnpClientComm.
|
static |
|
pure virtual |
open database
Implemented in RpcClientComm, and RnpClientComm.
|
pure virtual |
begin transaction
Implemented in RpcClientComm, and RnpClientComm.
|
pure virtual |
removes an object from a collection
Implemented in RpcClientComm, and RnpClientComm.
|
pure 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.
Implemented in RpcClientComm, and RnpClientComm.
|
pure virtual |
set maximum retry to get a server
Implemented in RpcClientComm, and RnpClientComm.
|
pure virtual |
set the preferred storage format
Implemented in RpcClientComm, and RnpClientComm.
|
pure virtual |
set and get communication timeout interval. Only RNP really uses it
Implemented in RpcClientComm, and RnpClientComm.
|
pure virtual |
set the preferred transfer format
Sends an alive signal to the server if the switch { aliveSignalRemaining} is set and no other RPC is active. If a signal can be sent, { aliveSignalRemaining} is set to 0 again.
Implemented in RpcClientComm, and RnpClientComm.
|
pure virtual |
user identification for RasMGR
Implemented in RpcClientComm, and RnpClientComm.
|
pure virtual |
triggers an alive signal
Implemented in RpcClientComm, and RnpClientComm.
|
static |
Methods for setting the protocol. Default will be RNP, but until release 5.2 it is RPC, unless you compile with -DDEFAULTRNP Also, if the environment variable RMANPROTOCOL is set, it's value is used to set the protocol and the 'in-code' setting is ignored RMANPROTOCOL can be:
NOTE: This methods will be removed in the next version
|
static |