Class SyncExecutionService

    • Field Detail

      • queue

        protected java.util.Set<IExecutable> queue
        The queue of tasks to be executed.
      • executor

        protected Executor executor
        The executor.
      • idlefuture

        protected volatile Future<java.lang.Void> idlefuture
        The idle future.
      • removedtask

        protected IExecutable removedtask
        Flag that indicates that the current task has been removed.
      • removedfut

        protected java.util.List<Future<java.lang.Void>> removedfut
        The removed listeners.
    • Constructor Detail

      • SyncExecutionService

        public SyncExecutionService​(IInternalAccess provider)
        Create a new synchronous executor service.
      • SyncExecutionService

        public SyncExecutionService​(IInternalAccess provider,
                                    java.util.Map<java.lang.String,​java.lang.Object> properties)
        Create a new synchronous executor service.
    • Method Detail

      • execute

        public void execute​(IExecutable task)
        Execute a task. Triggers the task to be executed in future.
        Specified by:
        execute in interface IExecutionService
        Parameters:
        task - The task to execute.
      • cancel

        public IFuture<java.lang.Void> cancel​(IExecutable task)
        Cancel a task. Triggers the task to be not executed in future.
        Specified by:
        cancel in interface IExecutionService
        Parameters:
        task - The task to execute.
        Returns:
        Future signaling cancellation.
      • customIsValid

        public boolean customIsValid()
        Test if the service is valid.
        Returns:
        True, if service can be used.
      • getThreadPool

        protected IThreadPoolService getThreadPool()
        Thread pool template method to support replacment.