GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — android-client/executor at master · splitio/android-client

Expand file tree

/

executor

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

executor

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
src
src
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
build.gradle
build.gradle
 
 

README.md

Outline

executor

Generic task scheduling and execution infrastructure for the Split Android SDK.

Purpose

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.

Usage

Basic Task Execution

SplitTaskExecutor executor = new SplitTaskExecutorImpl();

SplitTask task = () -> {
    // Do work
    return SplitTaskExecutionInfo.success(SplitTaskType.GENERIC_TASK);
};

executor.submit(task, null);

Scheduled Execution

executor.schedule(
    task,
    60,  // delay in seconds
    null  // optional listener
);

Parallel Execution

SplitParallelTaskExecutor<Result> parallelExecutor =
    new SplitParallelTaskExecutorFactoryImpl().build();

List<Callable<Result>> tasks = Arrays.asList(
    () -> fetchData1(),
    () -> fetchData2()
);

List<Result> results = parallelExecutor.executeParallelTasks(tasks, 60);

Lifecycle Management

executor.pause();   // Pause scheduled tasks
executor.resume();  // Resume scheduled tasks
executor.stop();    // Stop and shutdown executor

Dependencies

  • logger: Logging abstraction
  • Android framework: Handler/Looper for main thread execution
  • AndroidX annotations: @NonNull, @Nullable, etc.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.