Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
public class ElasticSearchConnection implements Connection {

private Client client;
//关闭标识
private boolean closeStatus = true;

public ElasticSearchConnection(String jdbcUrl, Properties info) {

Expand All @@ -41,6 +43,7 @@ public ElasticSearchConnection(String jdbcUrl, Properties info) {
transportClient.addTransportAddress(new TransportAddress(InetAddress.getByName(host), Integer.parseInt(port)));
}
client = transportClient;
closeStatus = false;
} catch (UnknownHostException e) {
e.printStackTrace();
}
Expand Down Expand Up @@ -586,12 +589,14 @@ public void rollback() throws SQLException {

@Override
public void close() throws SQLException {
this.getClient().close();
closeStatus = true;

}

@Override
public boolean isClosed() throws SQLException {
return false;
return closeStatus;
}

@Override
Expand Down