Interface ObjectRunnable<O1,​O2>

  • Type Parameters:
    O1 - The type of objects for which runnables are registered.
    O2 - The type of objects with which runnables are managed and executed within an object-specific executor service.
    All Superinterfaces:
    Runnable
    All Known Implementing Classes:
    AbstractObjectRunnable, ObjectOneWorkRunnable, PipelineRunnable, ScheduledObjectOneWorkRunnable

    public interface ObjectRunnable<O1,​O2>
    extends Runnable
    This interface represents a runnable that is identified via a specific object. This object may be mapped to an index object used within an object-specific executor service. For instance, by mapping different objects to the same index object, the amount of different objects handled by an objects-specific executor service may be restricted.
    • Method Detail

      • getRegisteredObject

        O1 getRegisteredObject()
        Gets the object with which this runnable has been registered at an object-specific executor service.
        Returns:
        The object with which this runnable has been registered at an object-specific executor service.
      • getIndexObject

        O2 getIndexObject()
        Gets the object with which this runnable is managed and executed within an object-specific executor service.
        Returns:
        The object with which this runnable is managed and executed within an object-specific executor service.
      • awaitTermination

        void awaitTermination()
                       throws InterruptedException
        Awaits the termination of this runnable. Either the thread has been interrupted, its termination has been requested or the runnable has simply finished.
        Throws:
        InterruptedException - If the waiting thread is interrupted while waiting for this runnable to terminate, an InterruptedException will be thrown.