D
- S
- public class AbstractPreparedStatementInvocationHandler<D,S extends java.sql.PreparedStatement> extends AbstractStatementInvocationHandler<D,S>
AbstractInvocationHandler.SimpleInvoker
Modifier and Type | Field and Description |
---|---|
protected java.util.List<java.util.concurrent.locks.Lock> |
lockList |
protected boolean |
selectForUpdate |
fileSupport, transactionContext
cluster, logger
Constructor and Description |
---|
AbstractPreparedStatementInvocationHandler(java.sql.Connection connection,
SQLProxy<D,java.sql.Connection> proxy,
Invoker<D,java.sql.Connection,S> invoker,
java.lang.Class<S> statementClass,
java.util.Map<Database<D>,S> statementMap,
TransactionContext<D> transactionContext,
FileSupport fileSupport,
java.util.Set<java.lang.reflect.Method> setMethods) |
Modifier and Type | Method and Description |
---|---|
protected InvocationStrategy<D,S,?> |
getInvocationStrategy(S statement,
java.lang.reflect.Method method,
java.lang.Object[] parameters)
Returns the appropriate
InvocationStrategy for the specified method. |
protected Invoker<D,S,?> |
getInvoker(S statement,
java.lang.reflect.Method method,
java.lang.Object[] parameters)
Return the appropriate invoker for the specified method.
|
protected boolean |
isBatchMethod(java.lang.reflect.Method method) |
protected boolean |
isIndexType(java.lang.Class<?> type) |
close, extractLocks, getDatabaseProperties, handlePartialFailure, isEndBatchMethod, isRecordable, isSelectForUpdate, isSQLMethod, postInvoke, record, replay
close, createObject, getParent, getParentProxy, getRoot
addChild, detectClusterPanic, entries, entry, getDatabaseCluster, getObject, handleFailure, handleFailures, invoke, removeChild, removeChildren, retain
protected java.util.List<java.util.concurrent.locks.Lock> lockList
protected boolean selectForUpdate
public AbstractPreparedStatementInvocationHandler(java.sql.Connection connection, SQLProxy<D,java.sql.Connection> proxy, Invoker<D,java.sql.Connection,S> invoker, java.lang.Class<S> statementClass, java.util.Map<Database<D>,S> statementMap, TransactionContext<D> transactionContext, FileSupport fileSupport, java.util.Set<java.lang.reflect.Method> setMethods) throws java.lang.Exception
connection
- proxy
- invoker
- statementClass
- statementMap
- transactionContext
- fileSupport
- java.lang.Exception
protected InvocationStrategy<D,S,?> getInvocationStrategy(S statement, 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 AbstractStatementInvocationHandler<D,S extends java.sql.PreparedStatement>
statement
- the proxied objectmethod
- the method to invokeparameters
- the method invocation parametersjava.lang.Exception
AbstractStatementInvocationHandler.getInvocationStrategy(java.sql.Statement, java.lang.reflect.Method, java.lang.Object[])
protected Invoker<D,S,?> getInvoker(S statement, java.lang.reflect.Method method, java.lang.Object[] parameters) throws java.lang.Exception
AbstractInvocationHandler
getInvoker
in class AbstractInvocationHandler<D,S extends java.sql.PreparedStatement>
java.lang.Exception
AbstractInvocationHandler.getInvoker(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
protected boolean isBatchMethod(java.lang.reflect.Method method)
isBatchMethod
in class AbstractStatementInvocationHandler<D,S extends java.sql.PreparedStatement>
AbstractStatementInvocationHandler.isBatchMethod(java.lang.reflect.Method)
protected boolean isIndexType(java.lang.Class<?> type)