D
- S
- public class ResultSetInvocationHandler<D,S extends java.sql.Statement> extends AbstractChildInvocationHandler<D,S,java.sql.ResultSet>
AbstractInvocationHandler.SimpleInvoker
Modifier and Type | Field and Description |
---|---|
protected FileSupport |
fileSupport |
cluster, logger
Modifier | Constructor and Description |
---|---|
protected |
ResultSetInvocationHandler(S statement,
SQLProxy<D,S> proxy,
Invoker<D,S,java.sql.ResultSet> invoker,
java.util.Map<Database<D>,java.sql.ResultSet> resultSetMap,
TransactionContext<D> transactionContext,
FileSupport fileSupport) |
Modifier and Type | Method and Description |
---|---|
protected void |
close(S statement,
java.sql.ResultSet resultSet) |
protected InvocationStrategy<D,java.sql.ResultSet,?> |
getInvocationStrategy(java.sql.ResultSet resultSet,
java.lang.reflect.Method method,
java.lang.Object[] parameters)
Returns the appropriate
InvocationStrategy for the specified method. |
protected Invoker<D,java.sql.ResultSet,?> |
getInvoker(java.sql.ResultSet object,
java.lang.reflect.Method method,
java.lang.Object[] parameters)
Return the appropriate invoker for the specified method.
|
<R> java.util.SortedMap<Database<D>,R> |
handlePartialFailure(java.util.SortedMap<Database<D>,R> resultMap,
java.util.SortedMap<Database<D>,java.lang.Exception> exceptionMap) |
protected boolean |
isRecordable(java.lang.reflect.Method method) |
protected void |
postInvoke(java.sql.ResultSet object,
java.lang.reflect.Method method,
java.lang.Object[] parameters)
Called after method is invoked.
|
protected void |
record(Invoker<D,java.sql.ResultSet,?> invoker,
java.lang.reflect.Method method,
java.lang.Object[] parameters) |
protected void |
replay(Database<D> database,
java.sql.ResultSet resultSet) |
close, createObject, getParent, getParentProxy, getRoot
addChild, detectClusterPanic, entries, entry, getDatabaseCluster, getObject, handleFailure, handleFailures, invoke, isSQLMethod, removeChild, removeChildren, retain
protected FileSupport fileSupport
protected ResultSetInvocationHandler(S statement, SQLProxy<D,S> proxy, Invoker<D,S,java.sql.ResultSet> invoker, java.util.Map<Database<D>,java.sql.ResultSet> resultSetMap, TransactionContext<D> transactionContext, FileSupport fileSupport) throws java.lang.Exception
statement
- the statement that created this result setproxy
- the invocation handler of the statement that created this result setinvoker
- the invoker that was used to create this result setresultSetMap
- a map of database to underlying result settransactionContext
- fileSupport
- support for streamsjava.lang.Exception
protected InvocationStrategy<D,java.sql.ResultSet,?> getInvocationStrategy(java.sql.ResultSet resultSet, java.lang.reflect.Method method, java.lang.Object[] parameters) throws java.lang.Exception
AbstractInvocationHandler
InvocationStrategy
for the specified method.
This implementation detects Wrapper
methods; and Object.equals(java.lang.Object)
, Object.hashCode()
, and Object.toString()
.
Default invocation strategy is DatabaseWriteInvocationStrategy
.getInvocationStrategy
in class AbstractInvocationHandler<D,java.sql.ResultSet>
resultSet
- the proxied objectmethod
- the method to invokeparameters
- the method invocation parametersjava.lang.Exception
AbstractInvocationHandler.getInvocationStrategy(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
protected Invoker<D,java.sql.ResultSet,?> getInvoker(java.sql.ResultSet object, java.lang.reflect.Method method, java.lang.Object[] parameters) throws java.lang.Exception
AbstractInvocationHandler
getInvoker
in class AbstractInvocationHandler<D,java.sql.ResultSet>
java.lang.Exception
AbstractInvocationHandler.getInvoker(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
protected void postInvoke(java.sql.ResultSet object, java.lang.reflect.Method method, java.lang.Object[] parameters)
AbstractInvocationHandler
postInvoke
in class AbstractInvocationHandler<D,java.sql.ResultSet>
object
- the proxied objectmethod
- the method that was just invokedparameters
- the parameters of the method that was just invokedAbstractInvocationHandler.postInvoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
public <R> java.util.SortedMap<Database<D>,R> handlePartialFailure(java.util.SortedMap<Database<D>,R> resultMap, java.util.SortedMap<Database<D>,java.lang.Exception> exceptionMap) throws java.lang.Exception
handlePartialFailure
in interface SQLProxy<D,java.sql.ResultSet>
handlePartialFailure
in class AbstractInvocationHandler<D,java.sql.ResultSet>
java.lang.Exception
AbstractInvocationHandler.handleFailures(java.util.SortedMap)
protected void close(S statement, java.sql.ResultSet resultSet) throws java.sql.SQLException
close
in class AbstractChildInvocationHandler<D,S extends java.sql.Statement,java.sql.ResultSet>
java.sql.SQLException
AbstractChildInvocationHandler.close(java.lang.Object, java.lang.Object)
protected void record(Invoker<D,java.sql.ResultSet,?> invoker, java.lang.reflect.Method method, java.lang.Object[] parameters)
record
in class AbstractInvocationHandler<D,java.sql.ResultSet>
AbstractInvocationHandler.record(net.sf.hajdbc.sql.Invoker, java.lang.reflect.Method, java.lang.Object[])
protected boolean isRecordable(java.lang.reflect.Method method)
isRecordable
in class AbstractInvocationHandler<D,java.sql.ResultSet>
AbstractInvocationHandler.isRecordable(java.lang.reflect.Method)
protected void replay(Database<D> database, java.sql.ResultSet resultSet) throws java.lang.Exception
replay
in class AbstractInvocationHandler<D,java.sql.ResultSet>
java.lang.Exception
AbstractInvocationHandler.replay(net.sf.hajdbc.Database, java.lang.Object)