@@ -56,6 +56,12 @@ public class DBConnection {
56
56
private boolean isReverseStreaming_ = false ;
57
57
private int tryReconnectNums = -1 ;
58
58
59
+ private ProgressListener _listener ;
60
+
61
+ public void set_listener (ProgressListener _listener ) {
62
+ this ._listener = _listener ;
63
+ }
64
+
59
65
private static final Logger log = LoggerFactory .getLogger (DBConnection .class );
60
66
61
67
private enum ExceptionType {
@@ -1357,7 +1363,7 @@ public Entity run(String function, List<Entity> arguments, int priority, int par
1357
1363
1358
1364
while (!closed_ ) {
1359
1365
try {
1360
- return conn_ .run (function , ( ProgressListener ) null , arguments , priority , parallelism , fetchSize , false , currentSeqNo );
1366
+ return conn_ .run (function , this . _listener == null ? null : this . _listener , arguments , priority , parallelism , fetchSize , false , currentSeqNo );
1361
1367
} catch (IOException e ) {
1362
1368
if (currentSeqNo > 0 )
1363
1369
currentSeqNo = -currentSeqNo ;
@@ -1376,7 +1382,7 @@ else if (type == ExceptionType.ET_UNKNOW)
1376
1382
}
1377
1383
return null ;
1378
1384
} else {
1379
- return conn_ .run (function , ( ProgressListener ) null , arguments , priority , parallelism , fetchSize , false , 0 );
1385
+ return conn_ .run (function , this . _listener == null ? null : this . _listener , arguments , priority , parallelism , fetchSize , false , 0 );
1380
1386
}
1381
1387
} finally {
1382
1388
mutex_ .unlock ();
0 commit comments