check修改
This commit is contained in:
parent
9fbebac1ea
commit
5518ffc457
@ -30,6 +30,10 @@ public class SydApi4Database implements SydApi {
|
|||||||
this.hsms = hsms;
|
this.hsms = hsms;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public SydApi4j[] getHsms() {
|
||||||
|
return hsms;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SydApi SYD_Short_Connect_Ex(String[] pcIpList, int[] iPortList, int iConnectTimeOut, int allDealTimeOut) {
|
public SydApi SYD_Short_Connect_Ex(String[] pcIpList, int[] iPortList, int iConnectTimeOut, int allDealTimeOut) {
|
||||||
Logger log = LogFactory.getLogger();
|
Logger log = LogFactory.getLogger();
|
||||||
|
|||||||
@ -55,12 +55,14 @@ public class SydApiPool extends ThreadBasedConnectPool<SydApi> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 保活接口
|
// 保活接口
|
||||||
protected boolean check(SydApi o) {
|
protected boolean check(SydApi4Database o) {
|
||||||
if (null==o) {
|
if (null==o) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
SydApi4j[] hsms = o.getHsms();
|
||||||
|
for (SydApi4j hsm : hsms) {
|
||||||
|
if ( null != hsm ) {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
o.SYD_SM3_Hash_ShortData( new byte[8] );
|
o.SYD_SM3_Hash_ShortData( new byte[8] );
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@ -69,6 +71,9 @@ public class SydApiPool extends ThreadBasedConnectPool<SydApi> {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// 释放
|
// 释放
|
||||||
protected void free(SydApi o) {
|
protected void free(SydApi o) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user