Class ClusteredTaskCoordinator<T>

  • Type Parameters:
    T - the type of the Task result
    All Implemented Interfaces:
    Task.Coordinator<T>, com.tangosol.util.MapListener, EventListener

    public class ClusteredTaskCoordinator<T>
    extends AbstractTaskCoordinator<T>
    implements com.tangosol.util.MapListener
    An implementation of a Task.Coordinator for Coherence-based implementation.
    Since:
    21.12
    Version:
    bo
    • Method Detail

      • cancel

        public boolean cancel​(boolean fMayInterruptIfRunning)
        Description copied from interface: Task.Coordinator
        Attempts to cancel execution of the Task. This attempt will fail if the task has already completed, has already been cancelled, or could not be cancelled for some other reason. If successful, and this task has not started when cancel is called, this task should never run. If the task has already started, then the mayInterruptIfRunning parameter determines whether the thread executing this task should be interrupted in an attempt to stop the task.

        After this method returns, subsequent calls to isDone() will always return true. Subsequent calls to isDone() will always return true if this method returned true.

        Specified by:
        cancel in interface Task.Coordinator<T>
        Overrides:
        cancel in class AbstractTaskCoordinator<T>
        Parameters:
        fMayInterruptIfRunning - true if the thread executing this task should be interrupted; otherwise, in-progress tasks are allowed to complete
        Returns:
        false if the task could not be cancelled, typically because it has already completed normally; true otherwise
        See Also:
        Future.cancel(boolean)
      • entryInserted

        public void entryInserted​(com.tangosol.util.MapEvent mapEvent)
        Specified by:
        entryInserted in interface com.tangosol.util.MapListener
      • entryUpdated

        public void entryUpdated​(com.tangosol.util.MapEvent mapEvent)
        Specified by:
        entryUpdated in interface com.tangosol.util.MapListener
      • entryDeleted

        public void entryDeleted​(com.tangosol.util.MapEvent mapEvent)
        Specified by:
        entryDeleted in interface com.tangosol.util.MapListener
      • addMemberListener

        public void addMemberListener​(com.tangosol.net.MemberListener listener)
        Adds the specified MemberListener.
        Parameters:
        listener - the MemberListener to add
      • removeMemberListener

        public void removeMemberListener​(com.tangosol.net.MemberListener listener)
        Removes the specified MemberListener.
        Parameters:
        listener - the MemberListener to remove
      • getCacheService

        protected com.tangosol.net.CacheService getCacheService()
      • removeMapListener

        protected void removeMapListener()
        Removes the MapListener previously installed by this ClusteredTaskCoordinator.