Exactly one GenerateSummaryTask is created per BibEntry object reference
(BibEntry#getId() is the tree key). A second call for the same entry while a task is
still running returns the existing task — no duplicate generation.
When a task completes successfully, the result is written to the InMemorySummaryCache
so that callers who were not listening at that moment can still retrieve it. The task is then
removed from the internal map.
All public methods are synchronized to make them safe for concurrent access from
both the JavaFX thread and background task threads.
| Modifier and Type | Field and Description |
|---|---|
| private final InMemorySummaryCache | |
| private final TaskExecutor | |
| private final TreeMap |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public synchronized Optional | |
| public synchronized GenerateSummaryTask | start(GenerateSummaryTaskRequest request)
Starts a |
| public synchronized GenerateSummaryTask | |
| private synchronized GenerateSummaryTask |
| inMemoryCache | back to summary |
|---|---|
| private final InMemorySummaryCache inMemoryCache | |
| taskExecutor | back to summary |
|---|---|
| private final TaskExecutor taskExecutor | |
| tasks | back to summary |
|---|---|
| private final TreeMap<BibEntry, GenerateSummaryTask> tasks | |
| SummarizationTaskAggregator | back to summary |
|---|---|
| public SummarizationTaskAggregator(TaskExecutor taskExecutor, InMemorySummaryCache inMemoryCache) | |
| getTask | back to summary |
|---|---|
| public synchronized Optional | |
| start | back to summary |
|---|---|
| public synchronized GenerateSummaryTask start(GenerateSummaryTaskRequest request) Starts a
Important Note if you attach a status listener to the returned task, also check
| |
| start | back to summary |
|---|---|
| public synchronized GenerateSummaryTask start(GenerateSummaryTaskRequest request, boolean showToUser) | |
| startNewTask | back to summary |
|---|---|
| private synchronized GenerateSummaryTask startNewTask(GenerateSummaryTaskRequest request, boolean showToUser) | |