Class LoadStepBase

    • Nested Class Summary

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

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

      Constructors 
      Modifier Constructor Description
      protected LoadStepBase​(com.github.akurilov.confuse.Config config, java.util.List<Extension> extensions, java.util.List<com.github.akurilov.confuse.Config> ctxConfigs, MetricsManager metricsMgr)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected int avgPeriod​(com.github.akurilov.confuse.Config metricsConfig)  
      protected void doClose()  
      protected void doStart()  
      protected abstract void doStartWrapped()  
      protected void doStop()  
      protected abstract void init()
      Initializes the actual configuration and metrics contexts
      protected abstract void initMetrics​(int originIndex, OpType opType, int concurrency, com.github.akurilov.confuse.Config metricsConfig, com.github.akurilov.commons.system.SizeInBytes itemDataSize, boolean outputColorFlag)  
      java.lang.String loadStepId()  
      java.util.List<? extends AllMetricsSnapshot> metricsSnapshots()  
      void run()  
      long runId()  
      • Methods inherited from class com.github.akurilov.commons.concurrent.AsyncRunnableBase

        await, await, doShutdown, 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

        isClosed, isInitial, isShutdown, isStarted, isStopped, shutdown, state
    • Field Detail

      • config

        protected final com.github.akurilov.confuse.Config config
      • extensions

        protected final java.util.List<Extension> extensions
      • ctxConfigs

        protected final java.util.List<com.github.akurilov.confuse.Config> ctxConfigs
    • Constructor Detail

      • LoadStepBase

        protected LoadStepBase​(com.github.akurilov.confuse.Config config,
                               java.util.List<Extension> extensions,
                               java.util.List<com.github.akurilov.confuse.Config> ctxConfigs,
                               MetricsManager metricsMgr)
    • Method Detail

      • loadStepId

        public final java.lang.String loadStepId()
        Specified by:
        loadStepId in interface LoadStep
        Returns:
        the step id
      • runId

        public final long runId()
        Specified by:
        runId in interface LoadStep
      • run

        public final void run()
        Specified by:
        run in interface java.lang.Runnable
      • doStart

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

        protected abstract void doStartWrapped()
      • init

        protected abstract void init()
                              throws java.lang.IllegalStateException
        Initializes the actual configuration and metrics contexts
        Throws:
        java.lang.IllegalStateException - if initialization fails
      • initMetrics

        protected abstract void initMetrics​(int originIndex,
                                            OpType opType,
                                            int concurrency,
                                            com.github.akurilov.confuse.Config metricsConfig,
                                            com.github.akurilov.commons.system.SizeInBytes itemDataSize,
                                            boolean outputColorFlag)
      • doStop

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

        protected void doClose()
                        throws java.io.IOException
        Overrides:
        doClose in class com.github.akurilov.commons.concurrent.AsyncRunnableBase
        Throws:
        java.io.IOException
      • avgPeriod

        protected int avgPeriod​(com.github.akurilov.confuse.Config metricsConfig)