@@ -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 {
@@ -1345,7 +1351,7 @@ public Entity run(String function, List<Entity> arguments, int priority, int par
1345
1351
1346
1352
while (!closed_ ) {
1347
1353
try {
1348
- return conn_ .run (function , ( ProgressListener ) null , arguments , priority , parallelism , fetchSize , false , currentSeqNo );
1354
+ return conn_ .run (function , this . _listener == null ? null : this . _listener , arguments , priority , parallelism , fetchSize , false , currentSeqNo );
1349
1355
} catch (IOException e ) {
1350
1356
if (currentSeqNo > 0 )
1351
1357
currentSeqNo = -currentSeqNo ;
@@ -1364,7 +1370,7 @@ else if (type == ExceptionType.ET_UNKNOW)
1364
1370
}
1365
1371
return null ;
1366
1372
} else {
1367
- return conn_ .run (function , ( ProgressListener ) null , arguments , priority , parallelism , fetchSize , false , 0 );
1373
+ return conn_ .run (function , this . _listener == null ? null : this . _listener , arguments , priority , parallelism , fetchSize , false , 0 );
1368
1374
}
1369
1375
} finally {
1370
1376
mutex_ .unlock ();
0 commit comments