Class LoadStepContextImpl<I extends Item,​O extends Operation<I>>

  • All Implemented Interfaces:
    Daemon, LoadStepContext<I,​O>, com.github.akurilov.commons.concurrent.AsyncRunnable, com.github.akurilov.commons.io.Output<O>, java.lang.AutoCloseable, java.rmi.Remote, java.util.function.Consumer<O>

    public class LoadStepContextImpl<I extends Item,​O extends Operation<I>>
    extends DaemonBase
    implements LoadStepContext<I,​O>
    Created by kurila on 12.07.16.
    • Nested Class Summary

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

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int activeOpCount()  
      protected void doClose()  
      protected void doShutdown()  
      protected void doStart()  
      protected void doStop()  
      boolean isDone()  
      void operationsMetricsOutput​(com.github.akurilov.commons.io.Output<O> opsMetricsOutput)  
      void operationsResultsOutput​(com.github.akurilov.commons.io.Output<O> opsResultsOutput)  
      int put​(java.util.List<O> opsResults)  
      int put​(java.util.List<O> opResults, int from, int to)  
      boolean put​(O opResult)  
      • Methods inherited from class com.github.akurilov.commons.concurrent.AsyncRunnableBase

        await, await, isClosed, isInitial, isShutdown, isStarted, isStopped, shutdown, start, state, stop
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.github.akurilov.commons.concurrent.AsyncRunnable

        await, await, isClosed, isInitial, isShutdown, isStarted, isStopped, shutdown, start, state
      • Methods inherited from interface java.util.function.Consumer

        andThen
      • Methods inherited from interface com.github.akurilov.commons.io.Output

        accept
    • Constructor Detail

      • LoadStepContextImpl

        public LoadStepContextImpl​(java.lang.String id,
                                   LoadGenerator<I,​O> generator,
                                   StorageDriver<I,​O> driver,
                                   MetricsContext metricsCtx,
                                   com.github.akurilov.confuse.Config loadConfig,
                                   boolean tracePersistFlag)
        Parameters:
        id - test step id
    • Method Detail

      • put

        public final boolean put​(O opResult)
        Specified by:
        put in interface com.github.akurilov.commons.io.Output<I extends Item>
      • put

        public final int put​(java.util.List<O> opResults,
                             int from,
                             int to)
        Specified by:
        put in interface com.github.akurilov.commons.io.Output<I extends Item>
      • put

        public final int put​(java.util.List<O> opsResults)
        Specified by:
        put in interface com.github.akurilov.commons.io.Output<I extends Item>
      • doStart

        protected void doStart()
                        throws java.lang.IllegalStateException
        Overrides:
        doStart in class com.github.akurilov.commons.concurrent.AsyncRunnableBase
        Throws:
        java.lang.IllegalStateException
      • doShutdown

        protected final void doShutdown()
        Overrides:
        doShutdown in class com.github.akurilov.commons.concurrent.AsyncRunnableBase
      • doStop

        protected final void doStop()
                             throws java.lang.IllegalStateException
        Overrides:
        doStop in class com.github.akurilov.commons.concurrent.AsyncRunnableBase
        Throws:
        java.lang.IllegalStateException
      • doClose

        protected final void doClose()
        Overrides:
        doClose in class com.github.akurilov.commons.concurrent.AsyncRunnableBase