Package com.j_spaces.jdbc
Class QueryHandler
java.lang.Object
com.j_spaces.jdbc.QueryHandler
QueryHandler executes the JDBC statements set by the
GConnection. For each statement the
QueryHandler performs the parsing (or retrieves the statement from QueryCache )
and calls the necessary methods of the GigaSpaces API.- Author:
- Michael Mitrani, 2Train4, 2004, anna - refactoring
-
Constructor Summary
ConstructorsConstructorDescriptionQueryHandler(IJSpace spaceCluster, IJSpace spaceRegular, QueryProcessorConfiguration config, SecurityInterceptor securityInterceptor) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close QueryHandler resourceshandleStatement(RequestPacket request, ISpaceProxy space) The main method to handle the query.visit(RequestPacketV3 request, QuerySession session) visit(SetAutoCommitRequest request, QuerySession session) Handle set auto commit [on off] requestvisit(SetTransaction request, QuerySession session) Handle set transaction lease timevisit(SetUseSingleSpace request, QuerySession session) Handle set single space [on off] requestvisit(RequestPacket request, QuerySession session)
-
Constructor Details
-
QueryHandler
public QueryHandler(IJSpace spaceCluster, IJSpace spaceRegular, QueryProcessorConfiguration config, SecurityInterceptor securityInterceptor)
-
-
Method Details
-
handleStatement
The main method to handle the query. first it will try to retrieve the query from the cache, if its not there, it will build a parser to parse the statement and then put it in the cache.- Throws:
SQLException
-
getTransactionManagerProvider
public ITransactionManagerProvider getTransactionManagerProvider() throws TransactionException, RemoteException- Throws:
TransactionExceptionRemoteException
-
close
Close QueryHandler resources- Throws:
RemoteException
-
getQueryCache
-
visit
public ResponsePacket visit(RequestPacket request, QuerySession session) throws LeaseDeniedException, RemoteException, TransactionException, SQLException - Returns:
- response packet
- Throws:
LeaseDeniedExceptionRemoteExceptionTransactionExceptionSQLException
-
visit
public ResponsePacket visit(RequestPacketV3 request, QuerySession session) throws LeaseDeniedException, RemoteException, TransactionException, SQLException - Returns:
- response packet for V3
- Throws:
LeaseDeniedExceptionRemoteExceptionTransactionExceptionSQLException
-
visit
public ResponsePacket visit(SetAutoCommitRequest request, QuerySession session) throws LeaseDeniedException, RemoteException, TransactionException Handle set auto commit [on off] request- Returns:
- response packet
- Throws:
LeaseDeniedExceptionRemoteExceptionTransactionException
-
visit
Handle set single space [on off] request- Returns:
- response packet
-
visit
Handle set transaction lease time- Returns:
- response packet
-