public interface

TaskExecutor

org.apache.helix.messaging.handling.TaskExecutor
Known Indirect Subclasses

Summary

Constants
int DEFAULT_PARALLEL_TASKS
Public Methods
abstract boolean cancelTask(MessageTask task)
cancel a message execution
abstract boolean cancelTimeoutTask(MessageTask task)
cancel the timeout for the given task
abstract void finishTask(MessageTask task)
finish a message execution
abstract List<Future<HelixTaskResult>> invokeAllTasks(List<MessageTask> tasks, long timeout, TimeUnit unit)
blocking on scheduling all tasks
abstract void registerMessageHandlerFactory(String type, MessageHandlerFactory factory)
register message handler factory this executor can handle
abstract void registerMessageHandlerFactory(String type, MessageHandlerFactory factory, int threadPoolSize)
register message handler factory this executor can handle with specified thread-pool size
abstract boolean scheduleTask(MessageTask task)
schedule a message execution
abstract void shutdown()
shutdown executor

Constants

public static final int DEFAULT_PARALLEL_TASKS

Constant Value: 40 (0x00000028)

Public Methods

public abstract boolean cancelTask (MessageTask task)

cancel a message execution

public abstract boolean cancelTimeoutTask (MessageTask task)

cancel the timeout for the given task

public abstract void finishTask (MessageTask task)

finish a message execution

public abstract List<Future<HelixTaskResult>> invokeAllTasks (List<MessageTask> tasks, long timeout, TimeUnit unit)

blocking on scheduling all tasks

public abstract void registerMessageHandlerFactory (String type, MessageHandlerFactory factory)

register message handler factory this executor can handle

public abstract void registerMessageHandlerFactory (String type, MessageHandlerFactory factory, int threadPoolSize)

register message handler factory this executor can handle with specified thread-pool size

public abstract boolean scheduleTask (MessageTask task)

schedule a message execution

public abstract void shutdown ()

shutdown executor