rgma (version 5.0.12)
index
/home/glbuild/GLITE_3_1_0_continous/org.glite.rgma.api-python/src/rgma.py

R-GMA API for Python
 
Provides classes and interfaces to access the R-GMA information and
monitoring system.

 
Modules
            
httplib
os
signal
socket
string
sys
time
types
urllib
urlparse
xml
 
Classes
            
ColumnDefinition
exceptions.Exception
RGMAException
RGMABufferFullException
RGMABusyException
RGMANoWorkingReplicasException
RGMASecurityException
RGMAUserException
RemoteException
UnknownResourceException
Index
ProducerDescription
ProducerProperties
Properties
QueryProperties
QueryType
RGMAWarning
ResourceEndpoint
Service
Registry
Resource
Consumer
OnDemandProducer
PrimaryProducer
SecondaryProducer
Schema
Storage
StorageType
TableDefinition
TimeInterval
TupleStore
Types
Units
_ResponseParser
__builtin__.list(__builtin__.object)
ResultSet
staticmethod
__builtin__.tuple(__builtin__.object)
_RGMATuple
 
class ColumnDefinition
      Information about a column
 
properties:
 
  name       - Column name
  type       - Column type (see Types)
  width      - Column width (e.g. for VARCHAR(240), 240 is the width), or
               None if there is no width
  notNull    - If true, column cannot contain a null value
  primaryKey - If true, column is part of the primary key
 
   Methods defined here:
__init__(self, name, type, width=None, notNull=0, primaryKey=0)
__str__(self)

Data and non-method functions defined here:
__doc__ = '\n\tInformation about a column\n\n\tproperties:\n\n\t n...ey - If true, column is part of the primary key\n\t'
__module__ = 'rgma'
 
class Consumer(Resource)
      Consumer is used to query R-GMA for information
 
Consumers execute an SQL query over the R-GMA information system. The
query may be over the latest tuples for each primary key, historical
tuples or may be 'continuous' in which case matching tuples are returned
as they are inserted (while the Consumer remains alive).
 
The query will only be executed once the start method has been called.
Matching tuples are retrieved in groups with a maximum size. When the
query has completed, either because all results have been returned or because
the query times out, a flag is set on the returned ResultSet.
 
  
Method resolution order:
Consumer
Resource
Service

Methods defined here:
__init__(self, terminationInterval, queryProperties, selectStatement, **kwargs)
Constructor
 
Parameters:
 
terminationInterval - TimeInterval specifying the termination 
                      interval for the resource
queryProperties     - A QueryProperties object
selectStatement     - SQL SELECT query to execute
__str__(self)
abort(self)
Abort the query if it is executing
count(self)
Return the number of tuples available to pop
 
THIS METHOD IS DEPRECATED AND WILL BE REMOVED IN A FUTURE VERSION
hasAborted(self)
Return True if the query has been aborted
isExecuting(self)
Return True if the query is currently executing
 
THIS METHOD IS DEPRECATED AND WILL BE REMOVED IN A FUTURE VERSION
pop(self, maxCount=None)
Return a ResultSet containing tuples that are the results of
the query.
 
Parameters:
 
maxCount - Maximum number of tuples to return.
 
If maxCount is not specified, all available tuples will be returned.
THIS IS DEPRECATED AND SHOULD NOT BE USED - ALWAYS SPECIFY A MAXIMUM COUNT.
start(self, timeout=None, producers=None)
Start executing the query
 
Parameters:
 
timeout   - TimeInterval specifying how long to run the query for before
            automatically aborting (optional - default no limit).
producers - List of ResourceEndpoint objects defining the producers to
            contact to answer the query. If specified R-GMA will bypass
            its usual mediation process and query the specified producers
            only. It is the user's responsibility to ensure that the
            producers are able to answer the specified query type.

Data and non-method functions defined here:
__doc__ = '\n\tA Consumer is used to query R-GMA for informat...s out, a flag is set on the returned ResultSet.\n\t'
__module__ = 'rgma'
getProperty = <rgma.staticmethod instance>
Get a property of the Consumer service
 
Parameters:
 
name      - Name of property
parameter - Optional parameter
getVersion = <rgma.staticmethod instance>
Get the version of the Consumer service
setProperty = <rgma.staticmethod instance>
Set a property of the Consumer service
 
Parameters:
 
name      - Name of property
value     - Value to set
parameter - Optional parameter

Methods inherited from Resource:
callMethod(self, method, returnType=None, **params)
Call a resource method.
 
Parameters:
 
  method     - Name of the method to call
  returnType - Type of the returned object (default None)
  params     - key/value parameters.
 
The resource connection ID is added to the service call automatically.
Service.callServiceMethod is then invoked with all other parameters.
close(self)
Closes the resource. 
 
The resource will no longer be available through this API and 
will be destroyed once it has finished interacting with other 
components.
destroy(self)
Close the resource immediately
 
The resource will no longer be available to any component.
getEndpoint(self)
Return the ResourceEndpoint of the resource
getTerminationInterval(self)
Return the termination interval for this resource as a 
TimeInterval object.
setTerminationInterval(self, interval)
Set the termination interval for this resource
 
THIS METHOD IS DEPRECATED AND WILL BE REMOVED IN A FUTURE VERSION
 
Patemeters:
 
  interval - TimeInterval object specifying the length of time the
             resource will stay active if no connections are made 
             to it. After this time, the resource will close 
             automatically.
showSignOfLife(self)
Indicate to the resource that this connection is still active.
 
This should be used to keep the resource alive when no
other methods need to be called.

Methods inherited from Service:
__del__(self)
_callServlet(self, command, **params)
_clear_connection(self)
_connect(self)
_sendMessage(self, path, command, encodedParams, headers)
boolToString(self, boolValue)
Encodes boolean 0/1 value as the strings "false"/"true", as
reqired by the services.
 
Parameters
  boolValue    - Boolean value to encode.
callServiceMethod(self, command, returnType=None, **params)
Call a method on the service.
 
Parameters:
 
  command    - Name of the method to call
  returnType - Type of the returned object (default None)
  params     - key/value parameters.
 
If returnType is specified, the returned ResultSet will be converted
to this type of object, if possible. Integers and boolean values
are assumed to be contained in the first column of the first row
of the ResultSet. Other objects will have their constructors called
with the arguments 'resultSet' and 'fromUrl' set to appropriate values.
 
class Index
      Information about an index on a table
 
properties:
 
  name    - Name of the index
  columns - List of column names to be indexed on
 
   Methods defined here:
__init__(self, name, columns)
__str__(self)

Data and non-method functions defined here:
__doc__ = '\n\tInformation about an index on a table\n\n\tproper...columns - List of column names to be indexed on\n\t'
__module__ = 'rgma'
 
class OnDemandProducer(Resource)
      An OnDemandProducer is used to publish information into R-GMA in
response to specific Consumer queries.
 
An OnDemandProducer may be used to make an existing data store (normally
a database) available for querying through R-GMA. It may also be useful
if the cost of creating the data to answer a query is high since with an
OnDemandProducer, this only needs to be done in response to specific Consumer
queries.
 
OnDemandProducers answer a special 'static' query type. They cannot answer
continuous, latest or history queries. When a static query is issued it
is forwarded from the OnDemandProducer service to a user-supplied socket://
URL. The user code listening at this URL is responsible for generating the
result set which answers the query and returning it to the OnDemandProducer
service. The OnDemandProducer service is responsible for streaming the data
to the Consumer.
 
The OnDemandProducer sends the unencoded SELECT statement to the socket using
the hostname and port specified in the URL. It reads the response back using
the same socket connection.
 
  
Method resolution order:
OnDemandProducer
Resource
Service

Methods defined here:
__init__(self, terminationInterval=None, uri=None, voNames=None, **kwargs)
Constructor
 
Parameters:
 
terminationInterval - TimeInterval object specifying the 
                      termination interval for the resource
uri                 - A socket:// URL where requests from the OnDemandProducer
                      service should be sent to user code.
voNames             - A list of Virtual Organisations to publish
                      to (DEPRECATED - DO NOT USE)
__str__(self)
declareStaticTable(self, tableName, predicate)
Declare a static table that this OnDemandProducer publishes to
 
Parameters:
 
tableName - The table to republish
predicate - An SQL WHERE predicate which all tuples from this
            producer must satisfy

Data and non-method functions defined here:
__doc__ = '\n\tAn OnDemandProducer is used to publish informa...esponse back using\n\tthe same socket connection.\n\t'
__module__ = 'rgma'
getProperty = <rgma.staticmethod instance>
Get a property of the OnDemandProducer service
 
Parameters:
 
name      - Name of property
parameter - Optional parameter
getVersion = <rgma.staticmethod instance>
Get the version of the OnDemandProducer service
setProperty = <rgma.staticmethod instance>
Set a property of the OnDemandProducer service
 
Parameters:
 
name      - Name of property
value     - Value to set
parameter - Optional parameter

Methods inherited from Resource:
callMethod(self, method, returnType=None, **params)
Call a resource method.
 
Parameters:
 
  method     - Name of the method to call
  returnType - Type of the returned object (default None)
  params     - key/value parameters.
 
The resource connection ID is added to the service call automatically.
Service.callServiceMethod is then invoked with all other parameters.
close(self)
Closes the resource. 
 
The resource will no longer be available through this API and 
will be destroyed once it has finished interacting with other 
components.
destroy(self)
Close the resource immediately
 
The resource will no longer be available to any component.
getEndpoint(self)
Return the ResourceEndpoint of the resource
getTerminationInterval(self)
Return the termination interval for this resource as a 
TimeInterval object.
setTerminationInterval(self, interval)
Set the termination interval for this resource
 
THIS METHOD IS DEPRECATED AND WILL BE REMOVED IN A FUTURE VERSION
 
Patemeters:
 
  interval - TimeInterval object specifying the length of time the
             resource will stay active if no connections are made 
             to it. After this time, the resource will close 
             automatically.
showSignOfLife(self)
Indicate to the resource that this connection is still active.
 
This should be used to keep the resource alive when no
other methods need to be called.

Methods inherited from Service:
__del__(self)
_callServlet(self, command, **params)
_clear_connection(self)
_connect(self)
_sendMessage(self, path, command, encodedParams, headers)
boolToString(self, boolValue)
Encodes boolean 0/1 value as the strings "false"/"true", as
reqired by the services.
 
Parameters
  boolValue    - Boolean value to encode.
callServiceMethod(self, command, returnType=None, **params)
Call a method on the service.
 
Parameters:
 
  command    - Name of the method to call
  returnType - Type of the returned object (default None)
  params     - key/value parameters.
 
If returnType is specified, the returned ResultSet will be converted
to this type of object, if possible. Integers and boolean values
are assumed to be contained in the first column of the first row
of the ResultSet. Other objects will have their constructors called
with the arguments 'resultSet' and 'fromUrl' set to appropriate values.
 
class PrimaryProducer(Resource)
      A Primary Producer is used to put new information into the
R-GMA system.
 
Tuples are inserted into named tables using standard SQL INSERT
statements. The tables must already exist in the global schema, and
before publishing to a table a primary producer must call its
declareTable method to announce its intention.
 
  
Method resolution order:
PrimaryProducer
Resource
Service

Methods defined here:
__init__(self, terminationInterval, producerProperties, voNames=None, **kwargs)
Constructor
 
Parameters:
 
terminationInterval - TimeInterval object specifying the 
                      termination interval for the resource
producerProperties  - A ProducerProperties object
voNames             - A list of Virtual Organisations to publish 
                      in (DEPRECATED - DO NOT USE)
__str__(self)
declareTable(self, tableName, predicate, historyRetentionPeriod, latestRetentionPeriod)
Declare a table that this Producer may publish tuples into
 
Parameters:
 
  tableName              - The table to publish into
  predicate              - An SQL WHERE predicate which must be
                           satisfied by every tuple this Producer
                           publishes. May be an empty string if no
                           predicate is required.
  historyRetentionPeriod - TimeInterval object specifying the 
                           length of time to keep tuples 
                           available to History queries.
  latestRetentionPeriod  - TimeInterval object specifying the default 
                           length of time to keep tuples
                           available to Latest queries. This may be
                           overridden in the insert method.
getHistoryRetentionPeriod(self, tableName)
Get the history retention period of a given table
 
This is a TimeInterval specifying the minimum length of time 
that tuples will be kept in the Producer's History queue
 
Parameters:
 
  tableName - The name of the table to return the retention period for
getLatestRetentionPeriod(self, tableName)
Get the latest retention period of a given table
 
This is a TimeInterval specifying the minimum length of time 
that tuples will be kept in the Producer's Latest queue
 
Parameters:
 
  tableName - The name of the table to return the retention period for
insert(self, insertStatement, latestRetentionPeriod=None)
Insert a tuple into a table
 
The table must have been declared with declareTable. 
 
Parameters:
 
  insertStatement       - SQL INSERT statement
  latestRetentionPeriod - TimeInterval specifying how long this tuple
                          should be considered as the latest information
                          for its primary key. If not specified, the default
                          given in declareTable is used.
insertList(self, insertStatementList, latestRetentionPeriod=None)
Insert a list of tuples
        
All tables inserted to must have been declared with declareTable
 
Parameters:
 
  insertStatementList   - A list of SQL INSERT statements
  latestRetentionPeriod - TimeInterval specifying how long these tuples
                          should be considered as the latest information
                          for their primary keys. If not specified, the default
                          given in declareTable is used.

Data and non-method functions defined here:
__doc__ = '\n\tA Primary Producer is used to put new informat...\tdeclareTable method to announce its intention.\n\t'
__module__ = 'rgma'
dropTupleStore = <rgma.staticmethod instance>
Pre-Python2.2 hack to allow us to declare static methods.
getProperty = <rgma.staticmethod instance>
Get a property of the PrimaryProducer service
 
Parameters:
 
name      - Name of property
parameter - Optional parameter
getVersion = <rgma.staticmethod instance>
Get the version of the PrimaryProducer service
listTupleStores = <rgma.staticmethod instance>
Pre-Python2.2 hack to allow us to declare static methods.
setProperty = <rgma.staticmethod instance>
Set a property of the PrimaryProducer service
 
Parameters:
 
name      - Name of property
value     - Value to set
parameter - Optional parameter

Methods inherited from Resource:
callMethod(self, method, returnType=None, **params)
Call a resource method.
 
Parameters:
 
  method     - Name of the method to call
  returnType - Type of the returned object (default None)
  params     - key/value parameters.
 
The resource connection ID is added to the service call automatically.
Service.callServiceMethod is then invoked with all other parameters.
close(self)
Closes the resource. 
 
The resource will no longer be available through this API and 
will be destroyed once it has finished interacting with other 
components.
destroy(self)
Close the resource immediately
 
The resource will no longer be available to any component.
getEndpoint(self)
Return the ResourceEndpoint of the resource
getTerminationInterval(self)
Return the termination interval for this resource as a 
TimeInterval object.
setTerminationInterval(self, interval)
Set the termination interval for this resource
 
THIS METHOD IS DEPRECATED AND WILL BE REMOVED IN A FUTURE VERSION
 
Patemeters:
 
  interval - TimeInterval object specifying the length of time the
             resource will stay active if no connections are made 
             to it. After this time, the resource will close 
             automatically.
showSignOfLife(self)
Indicate to the resource that this connection is still active.
 
This should be used to keep the resource alive when no
other methods need to be called.

Methods inherited from Service:
__del__(self)
_callServlet(self, command, **params)
_clear_connection(self)
_connect(self)
_sendMessage(self, path, command, encodedParams, headers)
boolToString(self, boolValue)
Encodes boolean 0/1 value as the strings "false"/"true", as
reqired by the services.
 
Parameters
  boolValue    - Boolean value to encode.
callServiceMethod(self, command, returnType=None, **params)
Call a method on the service.
 
Parameters:
 
  command    - Name of the method to call
  returnType - Type of the returned object (default None)
  params     - key/value parameters.
 
If returnType is specified, the returned ResultSet will be converted
to this type of object, if possible. Integers and boolean values
are assumed to be contained in the first column of the first row
of the ResultSet. Other objects will have their constructors called
with the arguments 'resultSet' and 'fromUrl' set to appropriate values.
 
class ProducerDescription
      Description of a Producer.
 
properties:
 
  queryTypes        - Query types supported - see QueryTypes
  endpoint          - ResourceEndpoint of producer
  hrp               - Producer history retention period
  secondaryProducer - Whether the producer is a secondary producer
  qosAttribute      - Quality of service attribute
 
   Methods defined here:
__init__(self, endpoint, queryTypes, secondaryProducer, hrp, qosAttribute=None)
__str__(self)
getEndpoint(self)
Get the ResourceEndpoint of the producer
getHistoryRetentionPeriod(self)
Get the History retention period of the producer as a TimeInterval
getQosAttribute(self)
Get the Quality of Service attribute
getQueryTypes(self)
Get the query types supported as a QueryType integer
isRepublisher(self)
Returns true if the producer is part of a
SecondaryProducer
isSecondaryProducer(self)
Returns true if the producer is part of a
SecondaryProducer

Data and non-method functions defined here:
__doc__ = '\n\tDescription of a Producer.\n\n\tproperties:\n\n\t q...osAttribute - Quality of service attribute\n\t'
__module__ = 'rgma'
 
class ProducerProperties
      Properties of a Primary or Secondary producer
 
ProducerProperties object must be passed when creating a Primary
or Secondary Producer
 
properties:
 
  storage - Storage object describing how the producer stores its tuples
  queryTypes - Query types supported as ANDed set of QueryType values
 
   Methods defined here:
__init__(self, storage, queryTypes=1, ignoreSlowConsumers=None)
Create a ProducerProperties object
 
Parameters:
 
storage             - a Storage object describing how
                      inserted tuples should be stored (e.g. 
                      memory, database)
queryTypes          - The types of queries to support. Should
                      be a combination of values from 
                      QueryType, e.g. QueryType.CONTINUOUS
                      or QueryType.LATEST + QueryType.HISTORY 
ignoreSlowConsumers - If True the producer will not block 
                      inserts when a slow consumer is 
                      preventing tuple deletion (DEPRECATED - DO
                      NOT USE)
__str__(self)
getStorage(self)
Return a StorageLocation object which is the type of storage 
a producer described by these ProducerProperties will use
isContinuous(self)
Returns True if these properties describe a Producer that
can answer latest queries
isHistory(self)
Returns True if these properties describe a Producer that
can answer history queries
isIgnoreSlowConsumers(self)
Returns True if these properties describe a Producer that will
not block inserts to preserve memory if a slow consumer is 
preventing deletion of old tuples.
isLatest(self)
Returns True if these properties describe a Producer that
can answer latest queries

Data and non-method functions defined here:
__doc__ = '\n\tProperties of a Primary or Secondary producer\n...ypes supported as ANDed set of QueryType values\n\t'
__module__ = 'rgma'
 
class Properties
      Provides access to the name/value properties loaded from a file
 
Typically used to access the RGMA global configuration file
$RGMA_HOME/etc/rgma/rgma.conf
 
   Methods defined here:
__init__(self, propsFile=None)
Constructor
 
Loads properties from a name=value format props file
 
Parameters:
 
propsFile - The file to load properties from. The usual usage is
            to leave this unspecified in which case it defaults
            to $RGMA_HOME/etc/rgma/rgma.conf (raising an 
            exception if the environment variable RGMA_HOME is
            unset).
__str__(self)
getProperties(self, filename)
Load properties from a simple properties file
 
The file must be of the form property=value. Whitespace is
discounted and lines beginning with # are ignored
 
Returns a dictionary of key/value pairs
getProperty(self, property)
Get a property from the RGMA configuration file
 
Parameters:
 
property - Name of the property to look up
 
Returns:
 
tuple containing all values of the property or an empty tuple if it is not set

Data and non-method functions defined here:
__doc__ = '\n\tProvides access to the name/value properties l...nfiguration file\n\t$RGMA_HOME/etc/rgma/rgma.conf\n\t'
__module__ = 'rgma'
 
class QueryProperties
      Describes the set of tuples to be queried.
 
Each query has a basic type (e.g. QueryType.CONTINUOUS) and may have an
associated TimeInterval representing the maximum age of tuples to 
query.
 
In the case of a continuous query the associated TimeInterval causes the
consumer to initially return a history of all tuples available up to
this maximum age, and to return all inserted tuples thereafter.
        
properties:
 
  queryType    - QueryType value describing the basic type of query.
  timeInterval - Associated time interval giving the maximum age of
                 tuples to return.
 
   Methods defined here:
__init__(self, queryType, timeInterval=None)
Constructor
 
Parameters:
 
queryType    - basic type of query. Must be one of:
                 QueryType.CONTINUOUS
                 QueryType.HISTORY
                 QueryType.LATEST
timeInterval - TimeInterval object specifying maximum age of 
               tuples to include in the results of the query 
               (optional - default no maximum)
__str__(self)
getQueryType(self)
Return the basic query type, i.e. one of:
 
QueryType.CONTINUOUS
QueryType.HISTORY
QueryType.LATEST
getTimeInterval(self)
Return TimeInterval specifying the maximum age of tuples to
return as results of the query
hasTimeInterval(self)
Returns True if the query has an associated time interval
isContinuous(self)
Returns true if the query is continuous
isHistory(self)
Returns true if the query is over archived historical tuples
isLatest(self)
Returns true if the query is over latest tuples only
isStatic(self)
Returns true if the query is over latest tuples only

Data and non-method functions defined here:
__doc__ = '\n\tDescribes the set of tuples to be queried.\n\t\n\t...imum age of\n\t tuples to return.\n\t'
__module__ = 'rgma'
 
class QueryType
      Describes the basic type of a query.
 
There are four types:
 
Continuous - runs continuously and returns tuples as they are inserted.
History    - returns tuples from producers' History queues
Latest     - returns the most recent tuples for each primary key
Static     - Returns tuples from On Demand producers only
 
   Data and non-method functions defined here:
CONTINUOUS = 1
HISTORY = 4
LATEST = 2
STATIC = 8
Type = {'continuous': 1, 'history': 4, 'latest': 2, 'static': 8}
TypeName = {1: 'continuous', 2: 'latest', 3: 'continuous latest', 4: 'history', 5: 'continuous history', 6: 'latest history', 7: 'continuous latest history', 8: 'static'}
__doc__ = '\n\tDescribes the basic type of a query.\n\t\n\tThere ... - Returns tuples from On Demand producers only\n\t'
__module__ = 'rgma'
 
class RGMABufferFullException(RGMAException)
      Exception thrown when there is insufficient space in
a Producer to insert a tuple. The best remedy is to pause
for some time (e.g. 5 minutes) and try again
 
  
Method resolution order:
RGMABufferFullException
RGMAException
exceptions.Exception

Methods defined here:
__init__(self, message, numSuccessfulOps=0, cause=None)

Data and non-method functions defined here:
__doc__ = '\n\tException thrown when there is insufficient sp...e\n\tfor some time (e.g. 5 minutes) and try again\n\t'
__module__ = 'rgma'

Methods inherited from RGMAException:
_RGMAException__addToStack = __addToStack(self, stack, exception)
__str__(self)
stackTrace(self)
Returns a string containing the complete stack trace of the exception.

Methods inherited from exceptions.Exception:
__getitem__(...)
 
class RGMABusyException(RGMAException)
      Exception thrown when a RGMA service is too overloaded to respond a client's request temporarily
 
  
Method resolution order:
RGMABusyException
RGMAException
exceptions.Exception

Methods defined here:
__init__(self, message, numSuccessfulOps=0, cause=None)

Data and non-method functions defined here:
__doc__ = "\n\tException thrown when a RGMA service is too overloaded to respond a client's request temporarily\n\t"
__module__ = 'rgma'

Methods inherited from RGMAException:
_RGMAException__addToStack = __addToStack(self, stack, exception)
__str__(self)
stackTrace(self)
Returns a string containing the complete stack trace of the exception.

Methods inherited from exceptions.Exception:
__getitem__(...)
 
class RGMAException(exceptions.Exception)
      Generic exception thrown when an error occurs within the R-GMA system.
 
Where possible, more specific subclasses of RGMAException will be thrown
instead. An internal error that does not relate to user input, however, will
be reported as an RGMAException.
 
properties:
 
  message          - String giving the error message
  numSuccessfulOps - Number of successful operations. Normally this property
                     will be 0 indicating that the operation was completely
                     unsuccessful. For batch operations, the operations will
                     be attempted in the order they are specified and will stop
                     on the first failure. In this case, numSuccessfulOps will
                     be the number of operations completed before the first
                     failure.
  cause            - Optional exception object giving the root cause of the
                     error. May or may not be an instance of RGMAException.
 
   Methods defined here:
_RGMAException__addToStack = __addToStack(self, stack, exception)
__init__(self, message, numSuccessfulOps=0, cause=None)
Constructor.
 
message - Message describing the error
__str__(self)
stackTrace(self)
Returns a string containing the complete stack trace of the exception.

Data and non-method functions defined here:
__doc__ = '\n\tGeneric exception thrown when an error occurs ...May or may not be an instance of RGMAException.\n\t'
__module__ = 'rgma'

Methods inherited from exceptions.Exception:
__getitem__(...)
 
class RGMANoWorkingReplicasException(RGMAException)
      Exception thrown when there is no working schema or registry replicas on RGMA server side
 
  
Method resolution order:
RGMANoWorkingReplicasException
RGMAException
exceptions.Exception

Methods defined here:
__init__(self, message, numSuccessfulOps=0, cause=None)

Data and non-method functions defined here:
__doc__ = '\n\tException thrown when there is no working schema or registry replicas on RGMA server side\n\t'
__module__ = 'rgma'

Methods inherited from RGMAException:
_RGMAException__addToStack = __addToStack(self, stack, exception)
__str__(self)
stackTrace(self)
Returns a string containing the complete stack trace of the exception.

Methods inherited from exceptions.Exception:
__getitem__(...)
 
class RGMASecurityException(RGMAException)
      Exception thrown when authentication or authorisation for an operation
failed
 
  
Method resolution order:
RGMASecurityException
RGMAException
exceptions.Exception

Methods defined here:
__init__(self, message, numSuccessfulOps=0, cause=None)

Data and non-method functions defined here:
__doc__ = '\n\tException thrown when authentication or authorisation for an operation\n\tfailed\n\t'
__module__ = 'rgma'

Methods inherited from RGMAException:
_RGMAException__addToStack = __addToStack(self, stack, exception)
__str__(self)
stackTrace(self)
Returns a string containing the complete stack trace of the exception.

Methods inherited from exceptions.Exception:
__getitem__(...)
 
class RGMAUserException(RGMAException)
      Exception thrown when there is an error relating to bad user input.
 
Some examples of bad user input are:
 
  Invalid tuple data for a table
  Non-existant table
  Non-existant VDB
  Attempt to create a table which already exists
  Invalid value for parameters (e.g. negative query timeout)
 
  
Method resolution order:
RGMAUserException
RGMAException
exceptions.Exception

Methods defined here:
__init__(self, message, numSuccessfulOps=0, cause=None)

Data and non-method functions defined here:
__doc__ = '\n\tException thrown when there is an error relati...ue for parameters (e.g. negative query timeout)\n\t'
__module__ = 'rgma'

Methods inherited from RGMAException:
_RGMAException__addToStack = __addToStack(self, stack, exception)
__str__(self)
stackTrace(self)
Returns a string containing the complete stack trace of the exception.

Methods inherited from exceptions.Exception:
__getitem__(...)
 
class RGMAWarning
      An RGMAWarning object may be attached to a ResultSet to warn about
the quality of answers to a query.
 
properties:
 
  message - The warning message string
 
   Methods defined here:
__init__(self, message)
Constructor
 
message - Warning message
__str__(self)
getMessage(self)
Returns the warning message

Data and non-method functions defined here:
__doc__ = '\n\tAn RGMAWarning object may be attached to a Res...rties:\n\n\t message - The warning message string\n\t'
__module__ = 'rgma'
 
class Registry(Service)
      Class providing an interface to the Registry for a virtual database.
 
Each virtual database (VDB) has its own separate logical Registry (which
may, however, be replicated by multiple registry services). This registry
contains information about all the producers and consumers publishing
or querying tables in the VDB.
 
Registry Service is a stateless R-GMA service which processes
requests for all VDB Registries. It may host any number of Registry Instances for
particular VDBs. If a registry service receives a request for a VDB it
does not host locally it forwards it on to another registry service which does.
A registry service which does not host any VDB instances is purely a proxy
service.
 
   Methods defined here:
__init__(self, vdbName=None)
Constructor
 
Parameters:
  vdbName - Name of the Virtual Database to connect to
__str__(self)
createRegistry(self, registryService)
Create a Registry instance for this virtual database on
a specified registry service
 
Parameters:
 
  registryService - URL of a Registry service
destroyRegistry(self, registryService)
Destroy the Registry instance for this virtual database on
a specified registry service
 
Parameters:
 
  registryService - URL of a Registry service
getAllProducersForTable(self, tableName)
Get a list of producers that publish a table in this virtual
database
 
Returns a list of ProducerDescription objects
 
Parameters:
  tableName  - Name of table

Data and non-method functions defined here:
__doc__ = '\n\tClass providing an interface to the Registry f...t any VDB instances is purely a proxy\n\tservice.\n\t'
__module__ = 'rgma'
getProperty = <rgma.staticmethod instance>
Get a property of the Registry service
 
Parameters:
 
name      - Name of property
parameter - Optional parameter
getVersion = <rgma.staticmethod instance>
Get the version of the Registry service
setProperty = <rgma.staticmethod instance>
Set a property of the Registry service
 
Parameters:
 
name      - Name of property
value     - Value to set
parameter - Optional parameter

Methods inherited from Service:
__del__(self)
_callServlet(self, command, **params)
_clear_connection(self)
_connect(self)
_sendMessage(self, path, command, encodedParams, headers)
boolToString(self, boolValue)
Encodes boolean 0/1 value as the strings "false"/"true", as
reqired by the services.
 
Parameters
  boolValue    - Boolean value to encode.
callServiceMethod(self, command, returnType=None, **params)
Call a method on the service.
 
Parameters:
 
  command    - Name of the method to call
  returnType - Type of the returned object (default None)
  params     - key/value parameters.
 
If returnType is specified, the returned ResultSet will be converted
to this type of object, if possible. Integers and boolean values
are assumed to be contained in the first column of the first row
of the ResultSet. Other objects will have their constructors called
with the arguments 'resultSet' and 'fromUrl' set to appropriate values.
 
class RemoteException(exceptions.Exception)
      Exception thrown when a connection to a remote service fails
 
properties:
 
  message - String giving the error message
 
   Methods defined here:
__init__(self, host, message=None)
Constructor.
 
host    - host:port of the connection which failed
message - Message describing the error
__str__(self)

Data and non-method functions defined here:
__doc__ = '\n\tException thrown when a connection to a remote...:\n\n\t message - String giving the error message\n\t'
__module__ = 'rgma'

Methods inherited from exceptions.Exception:
__getitem__(...)
 
class Resource(Service)
      Base class for a connection to a soft-state RGMA resource (e.g. Consumer
Producer, but not a Schema or Registry.)
 
A resource is identified by a ResourceEndpoint (a URL location with an
additional context ID). It has a 'termination interval' which specifies
how long the resource will remain alive if no contact is made with it.
Contact can be made by calling a method on the resource, or using the
showSignOfLife method.
 
Resources can also be closed explicitly, in which case they will finish
off any outstanding tasks before dying, or destroyed, in which case they
will die immediately.
 
properties
 
  endpoint - ResourceEndpoint of the resource
 
   Methods defined here:
__init__(self, serviceName, endpoint)
Constructor
 
Parameters:
 
  serviceName - Service name in rgma.conf (e.g. "Consumer")
  endpoint - ResourceEndpoint of the resource
callMethod(self, method, returnType=None, **params)
Call a resource method.
 
Parameters:
 
  method     - Name of the method to call
  returnType - Type of the returned object (default None)
  params     - key/value parameters.
 
The resource connection ID is added to the service call automatically.
Service.callServiceMethod is then invoked with all other parameters.
close(self)
Closes the resource. 
 
The resource will no longer be available through this API and 
will be destroyed once it has finished interacting with other 
components.
destroy(self)
Close the resource immediately
 
The resource will no longer be available to any component.
getEndpoint(self)
Return the ResourceEndpoint of the resource
getTerminationInterval(self)
Return the termination interval for this resource as a 
TimeInterval object.
setTerminationInterval(self, interval)
Set the termination interval for this resource
 
THIS METHOD IS DEPRECATED AND WILL BE REMOVED IN A FUTURE VERSION
 
Patemeters:
 
  interval - TimeInterval object specifying the length of time the
             resource will stay active if no connections are made 
             to it. After this time, the resource will close 
             automatically.
showSignOfLife(self)
Indicate to the resource that this connection is still active.
 
This should be used to keep the resource alive when no
other methods need to be called.

Data and non-method functions defined here:
__doc__ = '\n\tBase class for a connection to a soft-state RG...\n\t endpoint - ResourceEndpoint of the resource\n\t'
__module__ = 'rgma'

Methods inherited from Service:
__del__(self)
_callServlet(self, command, **params)
_clear_connection(self)
_connect(self)
_sendMessage(self, path, command, encodedParams, headers)
boolToString(self, boolValue)
Encodes boolean 0/1 value as the strings "false"/"true", as
reqired by the services.
 
Parameters
  boolValue    - Boolean value to encode.
callServiceMethod(self, command, returnType=None, **params)
Call a method on the service.
 
Parameters:
 
  command    - Name of the method to call
  returnType - Type of the returned object (default None)
  params     - key/value parameters.
 
If returnType is specified, the returned ResultSet will be converted
to this type of object, if possible. Integers and boolean values
are assumed to be contained in the first column of the first row
of the ResultSet. Other objects will have their constructors called
with the arguments 'resultSet' and 'fromUrl' set to appropriate values.
getProperty(self, name, parameter)
Get a service property
 
Parameters:
  name - Name of the property to get
  parameter - Optional parameter (may be None)
getVersion(self)
Get the service version
 
Returns a version string in the form major.minor.patch
setProperty(self, name, parameter, value)
Set a service property
 
Parameters:
  name - Name of the property
  parameter - Optional parameter (may be None)
  value    - Value to set
 
class ResourceEndpoint
      A resource endpoint consists of a URL and an optional resource ID
 
properties:
 
  url        - Service URL
  resourceId - Unique identifier of the resource
 
   Methods defined here:
__init__(self, url=None, resourceId=None, **kwargs)
Create a service or resource endpoint
 
Parameters:
 
url        - The URL of the service or resource
resourceId - The resource ID of the resource (optional)
__str__(self)
getResourceId(self)
Get the ID of the resource this ResourceEndpoint points to
 
Returns None if the ResourceEndpoint has no resource ID.
getUrl(self)
Get the URL of the ResourceEndpoint

Data and non-method functions defined here:
__doc__ = '\n\tA resource endpoint consists of a URL and an o... resourceId - Unique identifier of the resource\n\t'
__module__ = 'rgma'
 
class ResultSet(__builtin__.list)
      ResultSet is returned by a Consumer in response to a query
 
This is a subclass of the standard Python list so it can be manipulated
using the usual list functions.
 
properties:
 
  columnNames     - List of column name strings
  columnTableName - List table names which each column comes from. May be empty or None
  columnTypes     - List of Types giving the basic SQL type of each column
  endOfResults    - If 'true', this ResultSet contains the last results for the query.
  warning         - Warning string, if the results may be incomplete. May be None.
  columnWidths    - Maximum character widths of the data in each column.
 
  
Method resolution order:
ResultSet
__builtin__.list
__builtin__.object

Methods defined here:
__add__(self, rs)
__iadd__(self, rs)
__init__(self, tuples, columnNames=[], columnTableNames=[], columnTypes=[], endOfResults=0, warning=None)
Constructor
 
tuples           - List of tuples
columnNames      - List of column names
columnTableNames - List of the names of tables which the columns belong to
columnTypes      - List of rgma.Types object defining the column types
warning          - An RGMAWarning object if the results may be incomplete
__mul__(self, n)
__rmul__(self, n)
__str__(self)
footerToString(self, columnWidths=None)
getColumnNames(self)
Get the names of the columns in the ResultSet, not including
any table name prefix
getColumnTableNames(self)
Get the names of the tables each column is taken from
getColumnTypes(self)
Get the types of the data in the columns
 
Returns rgma.Types objects, e.g. rgma.Types.INTEGER
getColumnWidths(self)
Get a list of the maximum widths of the data in each column
getWarning(self)
Return the RGMAWarning object associated with this ResultSet
or None if no warning was associated
headerToString(self, columnWidths=None)
printFooter(self, columnWidths=None)
Print the bottom of the result set table
printHeader(self, columnWidths=None)
Print the column headings for the result set
printRows(self, columnWidths=None)
Print the rows in the result set formatted in a table
printTable(self)
Print the whole result set as a table
printWarning(self)
rowsToString(self, columnWidths=None)

Data and non-method functions defined here:
__dict__ = <dict-proxy object>
__doc__ = '\n\tA ResultSet is returned by a Consumer in respo...um character widths of the data in each column.\n\t'
__module__ = 'rgma'
__weakref__ = <member '__weakref__' of 'ResultSet' objects>

Methods inherited from __builtin__.list:
__contains__(...)
x.__contains__(y) <==> y in x
__delitem__(...)
x.__delitem__(y) <==> del x[y]
__delslice__(...)
x.__delslice__(i, j) <==> del x[i:j]
 
Use of negative indices is not supported.
__eq__(...)
x.__eq__(y) <==> x==y
__ge__(...)
x.__ge__(y) <==> x>=y
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__gt__(...)
x.__gt__(y) <==> x>y
__hash__(...)
x.__hash__() <==> hash(x)
__imul__(...)
x.__imul__(y) <==> x*=y
__le__(...)
x.__le__(y) <==> x<=y
__len__(...)
x.__len__() <==> len(x)
__lt__(...)
x.__lt__(y) <==> x<y
__ne__(...)
x.__ne__(y) <==> x!=y
__repr__(...)
x.__repr__() <==> repr(x)
__setitem__(...)
x.__setitem__(i, y) <==> x[i]=y
__setslice__(...)
x.__setslice__(i, j, y) <==> x[i:j]=y
 
Use of negative indices is not supported.
append(...)
L.append(object) -- append object to end
count(...)
L.count(value) -> integer -- return number of occurrences of value
extend(...)
L.extend(iterable) -- extend list by appending elements from the iterable
index(...)
L.index(value) -> integer -- return index of first occurrence of value
insert(...)
L.insert(index, object) -- insert object before index
pop(...)
L.pop([index]) -> item -- remove and return item at index (default last)
remove(...)
L.remove(value) -- remove first occurrence of value
reverse(...)
L.reverse() -- reverse *IN PLACE*
sort(...)
L.sort([cmpfunc]) -- sort *IN PLACE*; if given, cmpfunc(x, y) -> -1, 0, 1

Data and non-method functions inherited from __builtin__.list:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from __builtin__.object:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__reduce__(...)
helper for pickle
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value

Data and non-method functions inherited from __builtin__.object:
__class__ = <type 'type'>
 
class Schema(Service)
      Class providing an interface to the Schema for a virtual
database
 
Each virtual database (VDB) has a Schema which defines the tables
in the VDB and the authorisation rules for publishing and querying
the tables.
 
Schema Service is a stateless services that processes request for
all VDB schemas. It may host any number of VDB Schema Instances in which
case it can answer the request directly. Otherwise it will forward the request
to another Schema Service which does host the relevant VDB. A Schema service
which does not host any VDB instances is a pure proxy service.
 
   Methods defined here:
__init__(self, vdbName=None)
Constructor
 
Parameters
 
  vdbName - Name of the virtual database to connect to
__str__(self)
createIndex(self, createIndexStatement)
Create an index in the virtual database
 
Parameters:
 
  createIndexStatement - SQL 'CREATE INDEX' statement
createSchema(self, schemaService)
Create a Schema instance for this virtual database on
a specified schema service
 
Parameters:
 
  schemaService - URL of a Schema service
createTable(self, createTableStatement, tableAuthz)
Create a table in the virtual database
 
Parameters:
 
  createTableStatement - SQL 'CREATE TABLE' statement
  tableAuthz           - a list of table authorisation rules
createView(self, createViewStatement, viewAuthz)
Create a view in the virtual database
 
Parameters:
 
  createViewStatement - SQL 'CREATE VIEW' statement
  viewAuthz           - list of authorisation rules
destroySchema(self, schemaService)
Destroy the Schema instance for this virtual database on
a specified schema service
 
Parameters:
 
  schemaService - URL of a Schema service
dropIndex(self, indexName)
Drop an index from the virtual database
 
Parameters:
 
  indexName - Name of the index to drop
dropTable(self, tableName)
Drop a table from the virtual database
 
Parameters:
 
  tableName - Name of the table to drop
dropView(self, viewName)
Drop a view from the virtual database
 
Parameters:
 
  viewName - Name of the view to drop
getAllTables(self)
Returns a list of names of tables defined in the virtual database
getAuthorizationRules(self, tableName)
Get the authorisation rules for a table or view
 
Returns a list of rules.
 
Parameters:
 
  tableName  - Name of the table or view
getTableDefinition(self, tableName)
Get the definition of a table in the virtual database
 
Parameters:
 
  tableName - Name of the table to query
 
Returns a TableDefinition object
getTableIndexes(self, tableName)
Get a list of indexes associated with a table
 
Parameters:
 
  tableName - Name of the table. Indexes cannot be associated with a view
setAuthorizationRules(self, tableName, tableAuthz)
Set the authorisation rules for a table or view
 
Parameters:
 
  tableName  - Name of the table or view
  tableAuthz - List of authorisation rules

Data and non-method functions defined here:
__doc__ = '\n\tClass providing an interface to the Schema for...host any VDB instances is a pure proxy service.\n\t'
__module__ = 'rgma'
getProperty = <rgma.staticmethod instance>
Get a property of the Schema service
 
Parameters:
 
name      - Name of property
parameter - Optional parameter
getVersion = <rgma.staticmethod instance>
Get the version of the Schema service
setProperty = <rgma.staticmethod instance>
Set a property of the Schema service
 
Parameters:
 
name      - Name of property
value     - Value to set
parameter - Optional parameter

Methods inherited from Service:
__del__(self)
_callServlet(self, command, **params)
_clear_connection(self)
_connect(self)
_sendMessage(self, path, command, encodedParams, headers)
boolToString(self, boolValue)
Encodes boolean 0/1 value as the strings "false"/"true", as
reqired by the services.
 
Parameters
  boolValue    - Boolean value to encode.
callServiceMethod(self, command, returnType=None, **params)
Call a method on the service.
 
Parameters:
 
  command    - Name of the method to call
  returnType - Type of the returned object (default None)
  params     - key/value parameters.
 
If returnType is specified, the returned ResultSet will be converted
to this type of object, if possible. Integers and boolean values
are assumed to be contained in the first column of the first row
of the ResultSet. Other objects will have their constructors called
with the arguments 'resultSet' and 'fromUrl' set to appropriate values.
 
class SecondaryProducer(Resource)
      SecondaryProducer collects information from PrimaryProducers
and republishes it to R-GMA.
 
SecondaryProducers are used to bring tuples from different
PrimaryProducers together so that join queries may be performed. They
may also be used to archive data from PrimaryProducers that have
do not support history/latest queries, or have short retention periods.
 
  
Method resolution order:
SecondaryProducer
Resource
Service

Methods defined here:
__init__(self, terminationInterval=None, producerProperties=None, voNames=None, **kwargs)
Constructor
 
Parameters:
 
terminationInterval - TimeInterval object specifying the 
                      termination interval for the resource
producerProperties  - A ProducerProperties object
voNames             - A list of Virtual Organisations to publish
                      to (DEPRECATED - DO NOT USE)
__str__(self)
declareTable(self, tableName, predicate, historyRetentionPeriod)
Declare a table that this SecondaryProducer republishes
 
The latest retention period is inherited from the individual
PrimaryProducers the original data comes from.
 
Parameters:
 
tableName              - The table to republish
predicate              - The SQL WHERE predicate giving the part
                         of the table to republish
historyRetentionPeriod - TimeInterval specifying the length of 
                         time to keep tuples available to 
                         History queries.
getHistoryRetentionPeriod(self, tableName)
Get the history retention period for the SecondaryProducer
 
This is a TimeInterval specifying the minimum length of time 
that tuples will be kept in the SecondaryProducer's History 
queue
 
Parameters:
 
tableName - The name of the table to return the retention period for

Data and non-method functions defined here:
__doc__ = '\n\tA SecondaryProducer collects information from ...atest queries, or have short retention periods.\n\t'
__module__ = 'rgma'
dropTupleStore = <rgma.staticmethod instance>
Pre-Python2.2 hack to allow us to declare static methods.
getProperty = <rgma.staticmethod instance>
Get a property of the SecondaryProducer service
 
Parameters:
 
name      - Name of property
parameter - Optional parameter
getVersion = <rgma.staticmethod instance>
Get the version of the SecondaryProducer service
listTupleStores = <rgma.staticmethod instance>
Pre-Python2.2 hack to allow us to declare static methods.
setProperty = <rgma.staticmethod instance>
Set a property of the SecondaryProducer service
 
Parameters:
 
name      - Name of property
value     - Value to set
parameter - Optional parameter

Methods inherited from Resource:
callMethod(self, method, returnType=None, **params)
Call a resource method.
 
Parameters:
 
  method     - Name of the method to call
  returnType - Type of the returned object (default None)
  params     - key/value parameters.
 
The resource connection ID is added to the service call automatically.
Service.callServiceMethod is then invoked with all other parameters.
close(self)
Closes the resource. 
 
The resource will no longer be available through this API and 
will be destroyed once it has finished interacting with other 
components.
destroy(self)
Close the resource immediately
 
The resource will no longer be available to any component.
getEndpoint(self)
Return the ResourceEndpoint of the resource
getTerminationInterval(self)
Return the termination interval for this resource as a 
TimeInterval object.
setTerminationInterval(self, interval)
Set the termination interval for this resource
 
THIS METHOD IS DEPRECATED AND WILL BE REMOVED IN A FUTURE VERSION
 
Patemeters:
 
  interval - TimeInterval object specifying the length of time the
             resource will stay active if no connections are made 
             to it. After this time, the resource will close 
             automatically.
showSignOfLife(self)
Indicate to the resource that this connection is still active.
 
This should be used to keep the resource alive when no
other methods need to be called.

Methods inherited from Service:
__del__(self)
_callServlet(self, command, **params)
_clear_connection(self)
_connect(self)
_sendMessage(self, path, command, encodedParams, headers)
boolToString(self, boolValue)
Encodes boolean 0/1 value as the strings "false"/"true", as
reqired by the services.
 
Parameters
  boolValue    - Boolean value to encode.
callServiceMethod(self, command, returnType=None, **params)
Call a method on the service.
 
Parameters:
 
  command    - Name of the method to call
  returnType - Type of the returned object (default None)
  params     - key/value parameters.
 
If returnType is specified, the returned ResultSet will be converted
to this type of object, if possible. Integers and boolean values
are assumed to be contained in the first column of the first row
of the ResultSet. Other objects will have their constructors called
with the arguments 'resultSet' and 'fromUrl' set to appropriate values.
 
class Service
      Base class for a connection to an R-GMA service.
 
A service in itself has no state. Stateful resources are
modelled by adding a connection ID to service method calls.
 
properties:
 
  url - The URL of the service endpoint as a string
 
   Methods defined here:
__del__(self)
__init__(self, serviceName, url=None)
Constructor
 
Parameters:
  serviceName - Service name in rgma.conf (e.g. "Consumer").
  url         - Service url (looked up in rgma.conf if omitted)
_callServlet(self, command, **params)
_clear_connection(self)
_connect(self)
_sendMessage(self, path, command, encodedParams, headers)
boolToString(self, boolValue)
Encodes boolean 0/1 value as the strings "false"/"true", as
reqired by the services.
 
Parameters
  boolValue    - Boolean value to encode.
callServiceMethod(self, command, returnType=None, **params)
Call a method on the service.
 
Parameters:
 
  command    - Name of the method to call
  returnType - Type of the returned object (default None)
  params     - key/value parameters.
 
If returnType is specified, the returned ResultSet will be converted
to this type of object, if possible. Integers and boolean values
are assumed to be contained in the first column of the first row
of the ResultSet. Other objects will have their constructors called
with the arguments 'resultSet' and 'fromUrl' set to appropriate values.
getProperty(self, name, parameter)
Get a service property
 
Parameters:
  name - Name of the property to get
  parameter - Optional parameter (may be None)
getVersion(self)
Get the service version
 
Returns a version string in the form major.minor.patch
setProperty(self, name, parameter, value)
Set a service property
 
Parameters:
  name - Name of the property
  parameter - Optional parameter (may be None)
  value    - Value to set

Data and non-method functions defined here:
__doc__ = '\n\tBase class for a connection to an R-GMA servic...l - The URL of the service endpoint as a string\n\t'
__module__ = 'rgma'
 
class Storage
      Storage describes how tuples are stored for a Producer
 
It may describe a database, an in-memory structure, flat file, etc.
 
   Methods defined here:
__init__(self, storageType, location=None, username=None, password=None)
Create a StorageLocation object
 
Parameters:
 
storageType - Type of storage to use. Must be one of 
              StorageType.FILE (DEPRECATED), StorageType.DATABASE or
              StorageType.MEMORY.
location    - location of the storage. This should be a logical name
              and only used when reconnecting to a storage location
              used by a previous Producer (optional).
              If the storage type is DATABASE and a username and
              password are specified, the location is interpreted as
              a JDBC database URL. HOWEVER THIS BEHAVIOUR IS DEPRECATED AND
              SHOULD NOT BE USED.
username    - Username to use when accessing storage (optional)
              THIS PARAMETER IS DEPRECATED
password    - Password to use when accessing storage (optional)
              THIS PARAMETER IS DEPRECATED
__str__(self)
getLocation(self)
Returns the location (e.g. URL, file path) used to access the 
storage, or None if not applicable
getLogicalName(self)
Returns the logical name of the storage or None if not applicable
getPassword(self)
Returns the password used to access the storage, or None
if none required
getType(self)
Returns the type of storage, one of StorageType.DATABASE,
StorageType.MEMORY or StorageType.FILE
getUsername(self)
Returns the username used to access the storage, or None
if none required

Data and non-method functions defined here:
__doc__ = '\n\tStorage describes how tuples are stored for a ...tabase, an in-memory structure, flat file, etc.\n\t'
__module__ = 'rgma'
 
class StorageType
      Type of storage used by a producer for its tuples.
 
There are two basic types:
 
  DATABASE - Tuples stored in a persistent database. This provides
             resilience in the event of failure.
  MEMORY   - Tuples stored in memory. Performance is likely to be
             higher, particularly for streaming, however tuples may
             be lost if the producer fails.
 
   Data and non-method functions defined here:
DATABASE = 2
FILE = 1
MEMORY = 3
Type = {'database': 2, 'file': 1, 'memory': 3}
TypeName = {1: 'file', 2: 'database', 3: 'memory'}
__doc__ = '\n\tType of storage used by a producer for its tup...uples may\n\t\t be lost if the producer fails.\n\t'
__module__ = 'rgma'
 
class TableDefinition
      Information about a table from the Schema
 
   Methods defined here:
__init__(self, tableName, columns=[])
__str__(self)

Data and non-method functions defined here:
__doc__ = '\n\tInformation about a table from the Schema\n\t'
__module__ = 'rgma'
 
class TimeInterval
      A specific length of time comprising of a length and units (e.g.
1 second, 7 hours, etc.)
 
Time intervals must be > 0
 
properties:
 
  value - Number of time units in the interval
  units - Units the interval is measured in
 
   Methods defined here:
__init__(self, value=1, units=<rgma.Units instance>, **kwargs)
Constructor
 
Parameters:
 
value - Length of the time interval
units - Units the length is measured in (optional - default seconds)
__str__(self)
getUnits(self)
Returns the units the time interval is specified in
getValue(self)
Returns the value of the time interval
getValueAs(self, units)
Get the length of the time interval in specified units
 
Parameters:
 
units - Units object specifying time units to return

Data and non-method functions defined here:
__doc__ = '\n\tA specific length of time comprising of a leng...al\n\t units - Units the interval is measured in\n\t'
__module__ = 'rgma'
 
class TupleStore
      A named database used by a Producer to store tuples.
 
properties
 
  storageType - StorageType defining the basic type of storage used
  logicalName - Optional name for the storage, to allow a new producer to reconnect
                to the same storage.
  location    - Optional JDBC URL of the storage, if applicable. This may allow
                direct access to the storage if the user is authorised to access it.
 
   Methods defined here:
__init__(self, storageType, logicalName=None, location=None)
Create a StorageLocation object
 
Parameters:
 
storageType - Type of storage to use. Must be one of 
              StorageType.FILE (DEPRECATED), StorageType.DATABASE or
              StorageType.MEMORY.
logicalName - Name of the storage. If specified, this can be used for
              reconnecting to the same storage at a later date.
location    - JDBC url of the database used for the DATABASE storage type.
              Note that this cannot be specified when creating a producer, however
              the database location of a previously created tuple store
              can be found using the listTupleStores method on the Producer
              instance.

Data and non-method functions defined here:
__doc__ = '\n\tA named database used by a Producer to store t...storage if the user is authorised to access it.\n\t'
__module__ = 'rgma'
 
class Types
      SQL data types
 
Note that users should use these constants by name, rather than
relying on their numeric values which may change.
 
   Data and non-method functions defined here:
CHAR = 4
DATE = 7
DOUBLE = 3
INTEGER = 1
REAL = 2
TIME = 8
TIMESTAMP = 6
Type = {'CHAR': 4, 'DATE': 7, 'DOUBLE': 3, 'INTEGER': 1, 'REAL': 2, 'TIME': 8, 'TIMESTAMP': 6, 'VARCHAR': 5}
TypeName = {0: 'UNKNOWN', 1: 'INTEGER', 2: 'REAL', 3: 'DOUBLE', 4: 'CHAR', 5: 'VARCHAR', 6: 'TIMESTAMP', 7: 'DATE', 8: 'TIME'}
UNKNOWN = 0
VARCHAR = 5
__doc__ = '\n\tSQL data types\n\n\tNote that users should use th...lying on their numeric values which may change.\n\t'
__module__ = 'rgma'
 
class Units
      Base class for a unit of time
 
properties:
 
  seconds - Number of seconds in each unit
 
   Methods defined here:
__init__(self, seconds)
Constructor
 
Parameters:
 
seconds - The number of seconds represented by this time unit
getSeconds(self)
Return the number of seconds represented by this time unit

Data and non-method functions defined here:
DAYS = <rgma.Units instance>
HOURS = <rgma.Units instance>
MINUTES = <rgma.Units instance>
SECONDS = <rgma.Units instance>
Unit = {'days': <rgma.Units instance>, 'hours': <rgma.Units instance>, 'minutes': <rgma.Units instance>, 'seconds': <rgma.Units instance>}
UnitName = {<rgma.Units instance>: 'seconds', <rgma.Units instance>: 'minutes', <rgma.Units instance>: 'hours', <rgma.Units instance>: 'days'}
__doc__ = '\n\tBase class for a unit of time\n\n\tproperties:\n\n\t seconds - Number of seconds in each unit\n\t'
__module__ = 'rgma'
 
class UnknownResourceException(exceptions.Exception)
      Exception thrown when a Resource ID did not match any resource known to
the Service
 
properties:
 
  resourceId - ID of the resource which was unknown
 
   Methods defined here:
__init__(self, resourceId)
Constructor.
 
resourceId - Resource ID of the unknown resource
__str__(self)

Data and non-method functions defined here:
__doc__ = '\n\tException thrown when a Resource ID did not ma...ourceId - ID of the resource which was unknown \n\t'
__module__ = 'rgma'

Methods inherited from exceptions.Exception:
__getitem__(...)
 
class _RGMATuple(__builtin__.tuple)
      Special RGMA version of a Python tuple to allow things
like tuple['columnName'] as well as tuple[0]
 
  
Method resolution order:
_RGMATuple
__builtin__.tuple
__builtin__.object

Methods defined here:
__getitem__(self, item)

Data and non-method functions defined here:
__dict__ = <dict-proxy object>
__doc__ = "\n\tSpecial RGMA version of a Python tuple to allo...s\n\tlike tuple['columnName'] as well as tuple[0]\n\t"
__module__ = 'rgma'

Methods inherited from __builtin__.tuple:
__add__(...)
x.__add__(y) <==> x+y
__contains__(...)
x.__contains__(y) <==> y in x
__eq__(...)
x.__eq__(y) <==> x==y
__ge__(...)
x.__ge__(y) <==> x>=y
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__gt__(...)
x.__gt__(y) <==> x>y
__hash__(...)
x.__hash__() <==> hash(x)
__le__(...)
x.__le__(y) <==> x<=y
__len__(...)
x.__len__() <==> len(x)
__lt__(...)
x.__lt__(y) <==> x<y
__mul__(...)
x.__mul__(n) <==> x*n
__ne__(...)
x.__ne__(y) <==> x!=y
__repr__(...)
x.__repr__() <==> repr(x)
__rmul__(...)
x.__rmul__(n) <==> n*x

Data and non-method functions inherited from __builtin__.tuple:
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from __builtin__.object:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
__reduce__(...)
helper for pickle
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__str__(...)
x.__str__() <==> str(x)

Data and non-method functions inherited from __builtin__.object:
__class__ = <type 'type'>
 
class _ResponseParser
      Parser for XML responses from the RGMA server
 
   Methods defined here:
__init__(self, xmlData)
charData(self, data)
Called when character data is found
colEnd(self, name)
colMetadataEnd(self, name)
colMetadataStart(self, name, attrs)
colStart(self, name, attrs)
endElement(self, name)
Called when an element end tag is found
exceptionEnd(self, name)
exceptionMessageEnd(self, name)
exceptionMessageStart(self, name, attrs)
exceptionStart(self, name, attrs)
metadataEnd(self, name)
metadataStart(self, name, attrs)
nameMetadataEnd(self, name)
nameMetadataStart(self, name, attrs)
oldColMetadataEnd(self, name)
oldColMetadataStart(self, name, attrs)
oldMetadataEnd(self, name)
oldMetadataStart(self, name, attrs)
responseEnd(self, name)
responseStart(self, name, attrs)
resultSetEnd(self, name)
resultSetStart(self, name, attrs)
rowEnd(self, name)
rowStart(self, name, attrs)
startElement(self, name, attrs)
Called when an element start tag is found
tableMetadataEnd(self, name)
tableMetadataStart(self, name, attrs)
typeMetadataEnd(self, name)
typeMetadataStart(self, name, attrs)
warningEnd(self, name)
warningMessageEnd(self, name)
warningMessageStart(self, name, attrs)
warningStart(self, name, attrs)

Data and non-method functions defined here:
EXCEPTION_TYPES = {0: <class rgma.RGMAException>, 1: <class rgma.RGMASecurityException>, 2: <class rgma.RGMAUserException>, 3: <class rgma.RGMABufferFullException>, 7: <class rgma.RGMANoWorkingReplicasException>, 9: <class rgma.RGMABusyException>}
TYPE_CODES = {1: 4, 4: 1, 6: 2, 7: 2, 8: 3, 12: 5, 91: 7, 92: 8, 93: 6}
TYPE_HANDLERS = {0: <type 'str'>, 1: <type 'int'>, 2: <type 'float'>, 3: <type 'float'>, 4: <type 'str'>, 5: <type 'str'>, 6: <type 'str'>, 7: <type 'str'>, 8: <type 'str'>}
__doc__ = '\n\tParser for XML responses from the RGMA server\n\t'
__module__ = 'rgma'
 
class staticmethod
      Pre-Python2.2 hack to allow us to declare static methods.
 
   Methods defined here:
__init__(self, anycallable)

Data and non-method functions defined here:
__doc__ = '\n\tPre-Python2.2 hack to allow us to declare static methods.\n\t'
__module__ = 'rgma'
 
Functions
            
TypeString(type, width=None)
Convert a type with optional width into a string
_getSecurityInfo()
Get the certificate and key files to be used for secure connections.
 
Returns cert_file, key_file
_urlencode(params)
interrupt_io(signum, frame)
Raise an exception if a connection times out
 
This is only used for pre-python 2.3
reconnect(resource, endpoint)
Reconnect to an existing RGMA resource
 
Parameters:
 
resource - Resource to reconnect to. Must be one of
             rgma.Consumer
             rgma.PrimaryProducer
             rgma.SecondaryProducer
             rgma.OnDemandProducer
endpoint - ResourceEndpoint object containing the URL and resource ID
           of the existing resource.
 
Data
             __file__ = '/home/glbuild/GLITE_3_1_0_continous/org.glite.rgma.api-python/src/rgma.pyc'
__name__ = 'rgma'
__version__ = '5.0.12'
_connection_timeout = 300
_use_alarm = 1