Class NamedClusteredExecutorService

    • Field Detail

      • f_name

        protected final Name f_name
        The executor's logical name.
      • m_viewNamed

        protected com.tangosol.net.NamedCache m_viewNamed
        Local view of executors matching this executor's name. If the map is empty, it means there is no registered executors for the given name causing attempted executions to be rejected.
    • Constructor Detail

      • NamedClusteredExecutorService

        public NamedClusteredExecutorService​(Name name)
        Constructs a NamedClusteredExecutorService for the given Name.
        Parameters:
        name - the executor service name
    • Method Detail

      • execute

        public void execute​(com.tangosol.util.function.Remote.Runnable command)
        Description copied from interface: RemoteExecutor
        Executes the given command at some time in the future. The command may execute in a new thread, in a pooled thread, or in the calling thread, at the discretion of the Executor implementation.
        Specified by:
        execute in interface RemoteExecutor
        Overrides:
        execute in class ClusteredExecutorService
        Parameters:
        command - the runnable task
      • shutdown

        public void shutdown()
        Description copied from interface: RemoteExecutor
        Initiates an orderly shutdown in which previously submitted tasks are executed, but no new tasks will be accepted. Invocation has no additional effect if already shut down.

        This method does not wait for previously submitted tasks to complete execution. Use awaitTermination to do that.

        Specified by:
        shutdown in interface RemoteExecutor
        Overrides:
        shutdown in class ClusteredExecutorService
      • shutdownNow

        public List<Runnable> shutdownNow()
        Description copied from interface: RemoteExecutor
        Attempts to stop all actively executing tasks, halts the processing of waiting tasks, and returns a list of the tasks that were awaiting execution.

        This method does not wait for actively executing tasks to terminate. Use awaitTermination to do that.

        There are no guarantees beyond best-effort attempts to stop processing actively executing tasks. For example, typical implementations will cancel via Thread.interrupt(), so any task that fails to respond to interrupts may never terminate.

        Specified by:
        shutdownNow in interface RemoteExecutor
        Overrides:
        shutdownNow in class ClusteredExecutorService
        Returns:
        list of tasks that never commenced execution
      • init

        protected void init​(com.tangosol.net.CacheService cacheService)
        Description copied from class: ClusteredExecutorService
        Responsible for adding indexes for the ClusteredAssignment cache.
        Overrides:
        init in class ClusteredExecutorService
        Parameters:
        cacheService - the cache service providing the caches used by the executor service
      • session

        protected static com.tangosol.net.Session session()
        Return the Coherence session for the coherence-concurrent module.
        Returns:
        the Coherence session for the coherence-concurrent module
        Throws:
        IllegalStateException - if no session is found; most likely means this API was called without initializing Coherence using the Bootstrap API
      • release

        protected void release()
        Releases resources associated with this NamedExecutorService.