@@ -20,12 +20,10 @@ public class ExclusiveDBConnectionPool implements DBConnectionPool {
2020
2121 private class AsyncWorker implements Runnable {
2222 private DBConnection conn_ ;
23- boolean enableSeqNo = true ;
2423 private final Thread workThread_ ;
2524
26- public AsyncWorker (DBConnection conn , boolean enableSeqNo ) {
25+ public AsyncWorker (DBConnection conn ) {
2726 this .conn_ = conn ;
28- this .enableSeqNo = enableSeqNo ;
2927 workThread_ = new Thread (this );
3028 workThread_ .start ();
3129 }
@@ -51,7 +49,7 @@ public void run() {
5149 break ;
5250 }
5351 try {
54- task .setDBConnection (conn_ , enableSeqNo );
52+ task .setDBConnection (conn_ );
5553 task .call ();
5654 } catch (InterruptedException e ) {
5755 break ;
@@ -73,14 +71,10 @@ public void run() {
7371 }
7472
7573 public ExclusiveDBConnectionPool (String host , int port , String uid , String pwd , int count , boolean loadBalance , boolean enableHighAvailability ) throws IOException {
76- this (host , port , uid , pwd , count , loadBalance , enableHighAvailability , null , "" ,false , false , false , true );
74+ this (host , port , uid , pwd , count , loadBalance , enableHighAvailability , null , "" ,false , false , false );
7775 }
7876
7977 public ExclusiveDBConnectionPool (String host , int port , String uid , String pwd , int count , boolean loadBalance , boolean enableHighAvailability , String [] highAvailabilitySites , String initialScript ,boolean compress , boolean useSSL , boolean usePython ) throws IOException {
80- this (host , port , uid , pwd , count , loadBalance , enableHighAvailability , highAvailabilitySites , initialScript , compress , useSSL , usePython , true );
81- }
82-
83- public ExclusiveDBConnectionPool (String host , int port , String uid , String pwd , int count , boolean loadBalance , boolean enableHighAvailability , String [] highAvailabilitySites , String initialScript ,boolean compress , boolean useSSL , boolean usePython , boolean enableSeqNo ) throws IOException {
8478 if (count <= 0 )
8579 throw new RuntimeException ("The thread count can not be less than 0" );
8680 if (!loadBalance ) {
@@ -96,7 +90,7 @@ public ExclusiveDBConnectionPool(String host, int port, String uid, String pwd,
9690 throw new RuntimeException ("Can't connect to the specified host: " , e );
9791 }
9892
99- workers_ .add (new AsyncWorker (conn , enableSeqNo ));
93+ workers_ .add (new AsyncWorker (conn ));
10094 }
10195 } else {
10296 BasicStringVector nodes = null ;
@@ -123,7 +117,7 @@ public ExclusiveDBConnectionPool(String host, int port, String uid, String pwd,
123117 DBConnection conn = new DBConnection (false , useSSL , compress , usePython );
124118 if (!conn .connect (hosts [i % nodeCount ], ports [i % nodeCount ], uid , pwd , initialScript , enableHighAvailability , highAvailabilitySites ,false ,false ))
125119 throw new RuntimeException ("Can't connect to the host " + nodes .getString (i ));
126- workers_ .add (new AsyncWorker (conn , enableSeqNo ));
120+ workers_ .add (new AsyncWorker (conn ));
127121 }
128122 }
129123 }
0 commit comments