Skip to content

Commit 03330e0

Browse files
committed
Udpate readme
1 parent 4550e14 commit 03330e0

File tree

1 file changed

+2
-63
lines changed

1 file changed

+2
-63
lines changed

executor/README.md

Lines changed: 2 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -4,59 +4,7 @@ Generic task scheduling and execution infrastructure for the Split Android SDK.
44

55
## Purpose
66

7-
Provides a pausable, lifecycle-aware task executor with support for:
8-
- Scheduled and immediate task execution
9-
- Parallel task execution with timeout
10-
- Serial and batch task wrappers
11-
- Main thread task execution via Android Handler
12-
- Pause/resume support for Android lifecycle management
13-
14-
## Public API
15-
16-
### Core Executor
17-
18-
| Class / Interface | Role |
19-
|---|---|
20-
| `SplitTaskExecutor` | Main interface for task scheduling and execution |
21-
| `SplitTaskExecutorImpl` | Default implementation with configurable thread pool |
22-
| `SplitSingleThreadTaskExecutor` | Single-threaded variant for sequential execution |
23-
| `SplitBaseTaskExecutor` | Abstract base with pause/resume and lifecycle management |
24-
25-
### Task Abstractions
26-
27-
| Class / Interface | Role |
28-
|---|---|
29-
| `SplitTask` | Task interface with single `execute()` method |
30-
| `SplitTaskType` | Enum of 18 task types (SPLITS_SYNC, EVENTS_RECORDER, etc.) |
31-
| `SplitTaskExecutionInfo` | Execution result with status, type, and optional data |
32-
| `SplitTaskExecutionStatus` | SUCCESS or ERROR status enum |
33-
| `SplitTaskExecutionListener` | Callback interface for task completion |
34-
35-
### Parallel Execution
36-
37-
| Class / Interface | Role |
38-
|---|---|
39-
| `SplitParallelTaskExecutor<T>` | Interface for parallel task execution with timeout |
40-
| `SplitParallelTaskExecutorImpl<T>` | Implementation using ExecutorService.invokeAll() |
41-
| `SplitParallelTaskExecutorFactory` | Factory for creating parallel executors |
42-
43-
### Wrappers & Utilities
44-
45-
| Class / Interface | Role |
46-
|---|---|
47-
| `TaskWrapper` | Wraps SplitTask with execution listener callback |
48-
| `SplitTaskSerialWrapper` | Executes multiple tasks serially, stops on first error |
49-
| `SplitTaskBatchWrapper` | Batch execution wrapper for multiple tasks |
50-
| `ThreadFactoryBuilder` | Creates named daemon threads for executor |
51-
52-
### Pausable Schedulers
53-
54-
| Class / Interface | Role |
55-
|---|---|
56-
| `PausableScheduledThreadPoolExecutor` | Interface extending ScheduledExecutorService with pause/resume |
57-
| `PausableScheduledThreadPoolExecutorImpl` | Implementation with lifecycle-aware scheduling |
58-
| `PausableThreadPoolExecutor` | Non-scheduled pausable executor interface |
59-
| `PausableThreadPoolExecutorImpl` | Non-scheduled pausable executor implementation |
7+
Provides a pausable task executor with support for scheduled and immediate task execution, parallel task execution with timeout, serial and batch task wrappers, main thread task execution via Android Handler, and pause/resume/stop controls.
608

619
## Usage
6210

@@ -67,7 +15,7 @@ SplitTaskExecutor executor = new SplitTaskExecutorImpl();
6715

6816
SplitTask task = () -> {
6917
// Do work
70-
return SplitTaskExecutionInfo.success(SplitTaskType.SPLITS_SYNC);
18+
return SplitTaskExecutionInfo.success(SplitTaskType.GENERIC_TASK);
7119
};
7220

7321
executor.submit(task, null);
@@ -110,12 +58,3 @@ executor.stop(); // Stop and shutdown executor
11058
- **logger**: Logging abstraction
11159
- **Android framework**: Handler/Looper for main thread execution
11260
- **AndroidX annotations**: @NonNull, @Nullable, etc.
113-
114-
## Wiring (in main module)
115-
116-
Created in `SplitFactoryImpl`:
117-
118-
```java
119-
SplitTaskExecutor executor = new SplitTaskExecutorImpl();
120-
SplitTaskExecutor sseExecutor = new SplitSingleThreadTaskExecutor();
121-
```

0 commit comments

Comments
 (0)