@@ -56,12 +56,6 @@ 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
-
65
59
private static final Logger log = LoggerFactory .getLogger (DBConnection .class );
66
60
67
61
private enum ExceptionType {
@@ -1352,6 +1346,10 @@ private long newSeqNo(){
1352
1346
}
1353
1347
1354
1348
public Entity run (String function , List <Entity > arguments , int priority , int parallelism , int fetchSize , boolean enableSeqNo ) throws IOException {
1349
+ return run (function , arguments , priority , parallelism , fetchSize , enableSeqNo , null );
1350
+ }
1351
+
1352
+ public Entity run (String function , List <Entity > arguments , int priority , int parallelism , int fetchSize , boolean enableSeqNo , ProgressListener listener ) throws IOException {
1355
1353
mutex_ .lock ();
1356
1354
try {
1357
1355
if (!nodes_ .isEmpty ()) {
@@ -1363,7 +1361,7 @@ public Entity run(String function, List<Entity> arguments, int priority, int par
1363
1361
1364
1362
while (!closed_ ) {
1365
1363
try {
1366
- return conn_ .run (function , this . _listener == null ? null : this . _listener , arguments , priority , parallelism , fetchSize , false , currentSeqNo );
1364
+ return conn_ .run (function , listener , arguments , priority , parallelism , fetchSize , false , currentSeqNo );
1367
1365
} catch (IOException e ) {
1368
1366
if (currentSeqNo > 0 )
1369
1367
currentSeqNo = -currentSeqNo ;
@@ -1382,7 +1380,7 @@ else if (type == ExceptionType.ET_UNKNOW)
1382
1380
}
1383
1381
return null ;
1384
1382
} else {
1385
- return conn_ .run (function , this . _listener == null ? null : this . _listener , arguments , priority , parallelism , fetchSize , false , 0 );
1383
+ return conn_ .run (function , listener , arguments , priority , parallelism , fetchSize , false , 0 );
1386
1384
}
1387
1385
} finally {
1388
1386
mutex_ .unlock ();
0 commit comments