Java7 compatibility

This commit is contained in:
Dordian Draconia
2011-09-22 15:48:42 +03:00
parent 263b5a40d5
commit 9339a1865d
@@ -108,11 +108,15 @@ public class MySQLConnectionPool implements Closeable
private final Connection conn;
private boolean inuse;
private long timestamp;
private int networkTimeout;
private String schema;
JDCConnection(Connection conn) {
this.conn = conn;
inuse = false;
timestamp = 0;
networkTimeout = 30;
schema = "default";
}
@Override
@@ -366,6 +370,26 @@ public class MySQLConnectionPool implements Closeable
public <T> T unwrap(Class<T> iface) throws SQLException {
return conn.unwrap(iface);
}
public int getNetworkTimeout() throws SQLException {
return networkTimeout;
}
public void setNetworkTimeout(Executor exec, int timeout) throws SQLException {
networkTimeout = timeout;
}
public void abort(Executor exec) throws SQLException {
//Not implemented really...
}
public String getSchema() throws SQLException {
return schema;
}
public void setSchema(String str) throws SQLException {
schema = str;
}
long getLastUse() {
return timestamp;