Skip to content

Commit be98b88

Browse files
author
Hideki Itakura
committed
Applied feedbacks from @zgramana
- fix spelling mistake - use 0 as default value of executorThreadPooSize instead of -1
1 parent 02427b4 commit be98b88

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

src/main/java/com/couchbase/lite/Manager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -673,8 +673,8 @@ protected boolean isAutoMigrateBlobStoreFilename() {
673673
* @exclude
674674
*/
675675
@InterfaceAudience.Private
676-
public int getExecutorThreadPooSize() {
677-
return this.options.getExecutorThreadPooSize();
676+
public int getExecutorThreadPoolSize() {
677+
return this.options.getExecutorThreadPoolSize();
678678
}
679679
}
680680

src/main/java/com/couchbase/lite/ManagerOptions.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class ManagerOptions {
2020
* ReplicationInternal.java: public static final int EXECUTOR_THREAD_POOL_SIZE = 5;
2121
* https://github.com/couchbase/couchbase-lite-java-core/issues/343
2222
*/
23-
private int executorThreadPooSize = -1;
23+
private int executorThreadPoolSize = 0;
2424

2525
public ManagerOptions() {
2626
}
@@ -41,11 +41,11 @@ public void setAutoMigrateBlobStoreFilename(boolean autoMigrateBlobStoreFilename
4141
this.autoMigrateBlobStoreFilename = autoMigrateBlobStoreFilename;
4242
}
4343

44-
public int getExecutorThreadPooSize() {
45-
return executorThreadPooSize;
44+
public int getExecutorThreadPoolSize() {
45+
return executorThreadPoolSize;
4646
}
4747

48-
public void setExecutorThreadPooSize(int executorThreadPooSize) {
49-
this.executorThreadPooSize = executorThreadPooSize;
48+
public void setExecutorThreadPoolSize(int executorThreadPoolSize) {
49+
this.executorThreadPoolSize = executorThreadPoolSize;
5050
}
5151
}

src/main/java/com/couchbase/lite/replicator/ReplicationInternal.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -320,10 +320,10 @@ protected void initNetworkReachabilityManager() {
320320

321321
protected void goOnlineInitialStartup() {
322322

323-
int executorThreadPooSize = db.getManager().getExecutorThreadPooSize() <= 0 ?
324-
EXECUTOR_THREAD_POOL_SIZE: db.getManager().getExecutorThreadPooSize();
325-
Log.e(Log.TAG_SYNC, "executorThreadPooSize=" + executorThreadPooSize);
326-
remoteRequestExecutor = Executors.newScheduledThreadPool(executorThreadPooSize, new ThreadFactory() {
323+
int executorThreadPoolSize = db.getManager().getExecutorThreadPoolSize() <= 0 ?
324+
EXECUTOR_THREAD_POOL_SIZE: db.getManager().getExecutorThreadPoolSize();
325+
Log.v(Log.TAG_SYNC, "executorThreadPoolSize=" + executorThreadPoolSize);
326+
remoteRequestExecutor = Executors.newScheduledThreadPool(executorThreadPoolSize, new ThreadFactory() {
327327
private int counter = 0;
328328
@Override
329329
public Thread newThread(Runnable r) {

0 commit comments

Comments
 (0)