Interface LoadGenerator<I extends Item,​O extends Operation<I>>

  • All Superinterfaces:
    com.github.akurilov.commons.concurrent.AsyncRunnable, com.github.akurilov.fiber4j.Fiber, java.rmi.Remote
    All Known Implementing Classes:
    LoadGeneratorImpl

    public interface LoadGenerator<I extends Item,​O extends Operation<I>>
    extends com.github.akurilov.fiber4j.Fiber
    Created on 11.07.16.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.github.akurilov.commons.concurrent.AsyncRunnable

        com.github.akurilov.commons.concurrent.AsyncRunnable.State
    • Field Summary

      • Fields inherited from interface com.github.akurilov.fiber4j.Fiber

        DEBUG_DURATION_LIMIT_NANOS, SOFT_DURATION_LIMIT_NANOS, WARN_DURATION_LIMIT_NANOS
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void close()  
      long generatedOpCount()  
      boolean isItemInputFinished()  
      boolean isNothingToRecycle()  
      void recycle​(O op)
      Enqueues the task for further recycling
      • Methods inherited from interface com.github.akurilov.commons.concurrent.AsyncRunnable

        await, await, isClosed, isInitial, isShutdown, isStarted, isStopped, shutdown, start, state, stop
      • Methods inherited from interface com.github.akurilov.fiber4j.Fiber

        invoke
    • Method Detail

      • isItemInputFinished

        boolean isItemInputFinished()
        Returns:
        true if item input has been read until its end, false otherwise
      • generatedOpCount

        long generatedOpCount()
        Returns:
        sum of the new tasks and recycled ones
      • recycle

        void recycle​(O op)
        Enqueues the task for further recycling
        Parameters:
        op - the task to recycle
      • isNothingToRecycle

        boolean isNothingToRecycle()
        Returns:
        true if the internal recycle queue is empty, false otherwise
      • close

        void close()
            throws java.io.IOException
        Specified by:
        close in interface com.github.akurilov.commons.concurrent.AsyncRunnable
        Throws:
        java.io.IOException