All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinispan.commands.CancellationService Maven / Gradle / Ivy

There is a newer version: 15.1.0.Dev04
Show newest version
package org.infinispan.commands;

import java.util.UUID;

import org.infinispan.factories.scopes.Scope;
import org.infinispan.factories.scopes.Scopes;

/**
 * CancellationService manages association of Thread executing CancellableCommand in a remote VM and
 * if needed cancels command execution
 *
 * @author Vladimir Blagojevic
 * @since 5.2
 */
@Scope(Scopes.GLOBAL)
public interface CancellationService {

   /**
    * Registers thread with {@link CancellationService} under the given UUID id
    *
    * @param t
    *           thread to associate with id
    * @param id
    *           chosen UUID id
    */
   public void register(Thread t, UUID id);

   /**
    * Unregisters thread with {@link CancellationService} given an id
    *
    * @param id
    *           thread id
    */
   public void unregister(UUID id);

   /**
    * Cancels (invokes Thread#interrupt) a thread given a thread id
    *
    * @param id
    *           thread id
    */
   public void cancel(UUID id);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy