public class ConnectionTracker extends MethodCallAdapter
| Modifier and Type | Field and Description |
|---|---|
protected Func4<String,Object,Object,Method,Object[]> |
collectName |
protected boolean |
trackClose |
protected boolean |
trackStatements |
protected WeakReference<Connection> |
wconn |
protected WeakReference<ConnectPool> |
wcpool |
chainArgs, redefArgs| Constructor and Description |
|---|
ConnectionTracker(ConnectPool cpool,
Connection conn) |
| Modifier and Type | Method and Description |
|---|---|
void |
beginCall(Object proxy,
Object source,
Method meth,
Object[] args)
Вызывается перед началом метода
|
protected void |
collectActivity(Object proxy,
Object source,
Method meth,
Object[] args) |
HookResult |
endCall(Object proxy,
Object source,
Method meth,
Object[] args,
Object callResult,
Throwable err)
Вызывается по завершению метода
|
Func4<String,Object,Object,Method,Object[]> |
getCollectName() |
boolean |
isCollectActivity() |
boolean |
isTrackClose() |
boolean |
isTrackStatements() |
void |
setCollectName(Func4<String,Object,Object,Method,Object[]> fn) |
void |
setTrackClose(boolean trackClose) |
void |
setTrackStatements(boolean trackStatements) |
beginCallRewrite, isChainArgs, isRedefArgs, setChainArgs, setRedefArgsprotected final WeakReference<ConnectPool> wcpool
protected final WeakReference<Connection> wconn
protected boolean trackClose
protected boolean trackStatements
public ConnectionTracker(ConnectPool cpool, Connection conn)
public boolean isCollectActivity()
protected void collectActivity(Object proxy, Object source, Method meth, Object[] args)
public boolean isTrackClose()
public void setTrackClose(boolean trackClose)
public boolean isTrackStatements()
public void setTrackStatements(boolean trackStatements)
public void beginCall(Object proxy, Object source, Method meth, Object[] args)
MethodCallListenerbeginCall in interface MethodCallListenerbeginCall in class MethodCallAdapterproxy - Прокси объектsource - Исходный объектmeth - Методargs - Аргументыpublic HookResult endCall(Object proxy, Object source, Method meth, Object[] args, Object callResult, Throwable err)
MethodCallListenerendCall in interface MethodCallListenerendCall in class MethodCallAdapterproxy - Прокси объектsource - Исходный объектmeth - Методargs - АргументыcallResult - Результат вызоваerr - Ошибка вызоваCopyright © 2018. All rights reserved.