BackendConnection.java
1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package io.mycat.backend;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import io.mycat.backend.mysql.nio.handler.ResponseHandler;
import io.mycat.net.ClosableConnection;
import io.mycat.route.RouteResultsetNode;
import io.mycat.server.ServerConnection;
public interface BackendConnection extends ClosableConnection {
public boolean isModifiedSQLExecuted();
public boolean isFromSlaveDB();
public String getSchema();
public void setSchema(String newSchema);
public long getLastTime();
public boolean isClosedOrQuit();
public void setAttachment(Object attachment);
public void quit();
public void setLastTime(long currentTimeMillis);
public void release();
public boolean setResponseHandler(ResponseHandler commandHandler);
public void commit();
public void query(String sql) throws UnsupportedEncodingException;
public Object getAttachment();
// public long getThreadId();
public void execute(RouteResultsetNode node, ServerConnection source,
boolean autocommit) throws IOException;
public void recordSql(String host, String schema, String statement);
public boolean syncAndExcute();
public void rollback();
public boolean isBorrowed();
public void setBorrowed(boolean borrowed);
public int getTxIsolation();
public boolean isAutocommit();
public long getId();
public void discardClose(String reason);
}