rasdaman complete source
|
#include <rpcclientcomm.hh>
Public Member Functions | |
RpcClientComm (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... | |
~RpcClientComm () throw () | |
destructor (closes the connection and releases resources) More... | |
bool | effectivTypeIsRNP () throw () |
unsigned long | getClientID () const |
provides read access to my clientID More... | |
CLIENT * | getBindingHandle () const |
provides read access to my binding handle More... | |
void | setTimeoutInterval (int seconds) |
set and get communication timeout interval. Only RNP really uses it More... | |
int | getTimeoutInterval () |
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) |
get type structure dallocate using delete [] More... | |
void | triggerAliveSignal () |
triggers an alive signal More... | |
void | sendAliveSignal () |
send an alive signal if necessary and possible More... | |
int | setTransferFormat (r_Data_Format format, const char *formatParams=NULL) |
set the preferred transfer format More... | |
int | writeWholeMessage (int socket, char *destBuffer, int buffSize) |
int | readWholeMessage (int socket, char *destBuffer, int buffSize) |
int | setStorageFormat (r_Data_Format format, const char *formatParams=NULL) |
set the preferred storage format More... | |
void | setRPCActive () |
sets a mutex for RPC More... | |
void | setRPCInactive () |
frees the mutex for RPC and calls sendAliveSignal() for sending remaining signals More... | |
int | checkRPCActive () |
checks if an RPC is active More... | |
const char * | getExtendedErrorInfo () throw (r_Error) |
get extended error information 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... | |
![]() | |
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... | |
RpcClientComm::RpcClientComm | ( | 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).
RpcClientComm::~RpcClientComm | ( | ) | ||
throw | ( | |||
) |
destructor (closes the connection and releases resources)
|
virtual |
abort current transaction
Implements ClientComm.
int RpcClientComm::checkRPCActive | ( | ) |
checks if an RPC is active
|
virtual |
close current database
Implements ClientComm.
|
virtual |
commit current transaction
Implements ClientComm.
|
virtual |
create a database
Implements ClientComm.
|
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.
|
inline |
provides read access to my binding handle
|
inlinevirtual |
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* RpcClientComm::getServerName | ( | ) |
get real server name (the dinamic one, assigned by the RasMGR)
|
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.
int RpcClientComm::readWholeMessage | ( | int | socket, |
char * | destBuffer, | ||
int | buffSize | ||
) |
|
virtual |
removes an object from a collection
Implements ClientComm.
|
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.
void RpcClientComm::setRPCActive | ( | ) |
sets a mutex for RPC
void RpcClientComm::setRPCInactive | ( | ) |
frees the mutex for RPC and calls sendAliveSignal() for sending remaining signals
|
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
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.
Implements ClientComm.
|
virtual |
user identification for RasMGR
Implements ClientComm.
|
virtual |
triggers an alive signal
Implements ClientComm.
int RpcClientComm::writeWholeMessage | ( | int | socket, |
char * | destBuffer, | ||
int | buffSize | ||
) |