-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Externalising configuration for indexation workers
- Loading branch information
goulven
authored and
goulven
committed
Oct 3, 2024
1 parent
84dc67a
commit 4810c5e
Showing
4 changed files
with
84 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
api/src/main/java/org/open4goods/api/config/yml/IndexationConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package org.open4goods.api.config.yml; | ||
|
||
public class IndexationConfig { | ||
|
||
/** | ||
* Max size of the blocking queue | ||
*/ | ||
int queueMaxSize = 5000; | ||
|
||
/** | ||
* Bulk size (applied for update, means on fetching and on insertion in elastic cluster) | ||
*/ | ||
|
||
int bulkPageSize = 150; | ||
|
||
/** | ||
* Number ofconccurent workers | ||
*/ | ||
int workers = 2; | ||
|
||
/** | ||
* Duration of pause when no elements in the queue | ||
*/ | ||
int pauseDuration = 4000; | ||
|
||
|
||
public int getBulkPageSize() { | ||
return bulkPageSize; | ||
} | ||
public void setBulkPageSize(int dequeueSize) { | ||
this.bulkPageSize = dequeueSize; | ||
} | ||
public int getWorkers() { | ||
return workers; | ||
} | ||
public void setWorkers(int workers) { | ||
this.workers = workers; | ||
} | ||
public int getPauseDuration() { | ||
return pauseDuration; | ||
} | ||
public void setPauseDuration(int pauseDuration) { | ||
this.pauseDuration = pauseDuration; | ||
} | ||
public int getQueueMaxSize() { | ||
return queueMaxSize; | ||
} | ||
public void setQueueMaxSize(int queueMaxSize) { | ||
this.queueMaxSize = queueMaxSize; | ||
} | ||
|
||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters