SQLFire 1.0.1

com.vmware.sqlfire.procedure
Interface ProcedureProcessorContext


public interface ProcedureProcessorContext

Context object passed to a ProcedureResultProcessor in its init method.


Method Summary
 String[] getColocatedTableNames()
          Returns an array of colocated tables in this server in the format "schemaName.tableName".
 Connection getConnection()
          A "nested" JDBC connection that can be used by the processor to execute SQL.
 String getFilter()
          Returns the whereClause for this execution, or null if there wasn't one
 IncomingResultSet[] getIncomingOutParameters()
          Get the array of incoming result sets for the out parameters provided by the executing procedures.
 IncomingResultSet[] getIncomingResultSets(int resultSetNumber)
          Get the array of incoming result sets for a given result set number, where each array element is a result set provided by a procedure executing on some server.
 String getProcedureName()
          Return the name of this procedure.
 String getTableName()
          Returns the table name in the format "schemaName.tableName" if this procedure was executed with an ON TABLE clause, or null otherwise.
 boolean isPartitioned(String tableName)
          Returns true if the specified table is a partitioned table, false if it is a replicated table.
 boolean isPossibleDuplicate()
          Return true if this is a re-attempt occurring after a member of the distributed system has failed.
 

Method Detail

getIncomingResultSets

IncomingResultSet[] getIncomingResultSets(int resultSetNumber)
Get the array of incoming result sets for a given result set number, where each array element is a result set provided by a procedure executing on some server. The size of the array is equal to the number of servers executing this procedure.

Parameters:
resultSetNumber - the index of the result set corresponding to the result sets declared for this procedure.
Returns:
the incoming result sets for this resultSetNumber from all servers executing this procedure.

getIncomingOutParameters

IncomingResultSet[] getIncomingOutParameters()
Get the array of incoming result sets for the out parameters provided by the executing procedures. The size of the array is equal to the number of servers executing this procedure. Each of these result sets will only have one "row" in it, one Object[] corresponding to the out parameters.

Returns:
the incoming result sets that contain the one array of out parameters from that server.

getFilter

String getFilter()
Returns the whereClause for this execution, or null if there wasn't one


getTableName

String getTableName()
Returns the table name in the format "schemaName.tableName" if this procedure was executed with an ON TABLE clause, or null otherwise.


getColocatedTableNames

String[] getColocatedTableNames()
Returns an array of colocated tables in this server in the format "schemaName.tableName". If this procedure was not called with an ON TABLE clause, then this method returns null.


getProcedureName

String getProcedureName()
Return the name of this procedure.


getConnection

Connection getConnection()
A "nested" JDBC connection that can be used by the processor to execute SQL. If the SQL query string begins with the "" escape sequence, then execution will be restricted to local execution only. This Connection is the same Connection obtained with DriverManager.getConnection("jdbc:default:connection");


isPossibleDuplicate

boolean isPossibleDuplicate()
Return true if this is a re-attempt occurring after a member of the distributed system has failed. For some procedure implementations that are doing write operations, special handling may be necessary if this is a possible duplicate invocation on this data.


isPartitioned

boolean isPartitioned(String tableName)
Returns true if the specified table is a partitioned table, false if it is a replicated table.

Parameters:
tableName - name of table as "schemaName.tableName", or just "tableName" with default schema assumed.

SQLFire 1.0.1

Copyright © 2010-2011 VMware, Inc. All rights reserved.