Class LoadStepClientBase
- java.lang.Object
-
- com.github.akurilov.commons.concurrent.AsyncRunnableBase
-
- com.emc.mongoose.base.concurrent.DaemonBase
-
- com.emc.mongoose.base.load.step.LoadStepBase
-
- com.emc.mongoose.base.load.step.client.LoadStepClientBase
-
- All Implemented Interfaces:
Daemon,LoadStepClient,LoadStep,com.github.akurilov.commons.concurrent.AsyncRunnable,java.lang.Runnable,java.rmi.Remote
- Direct Known Subclasses:
LinearLoadStepClient
public abstract class LoadStepClientBase extends LoadStepBase implements LoadStepClient
-
-
Field Summary
-
Fields inherited from class com.emc.mongoose.base.load.step.LoadStepBase
config, ctxConfigs, extensions, metricsContexts, metricsMgr
-
Fields inherited from interface com.emc.mongoose.base.load.step.client.LoadStepClient
OUTPUT_PROGRESS_PERIOD_MILLIS
-
-
Constructor Summary
Constructors Constructor Description LoadStepClientBase(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 <T extends LoadStepClient>
Tappend(java.util.Map<java.lang.String,java.lang.Object> context)Append the load step context.booleanawait(long timeout, java.util.concurrent.TimeUnit timeUnit)<T extends LoadStepClient>
Tconfig(java.util.Map<java.lang.String,java.lang.Object> configMap)Configure the stepprotected abstract <T extends LoadStepClient>
TcopyInstance(com.github.akurilov.confuse.Config config, java.util.List<com.github.akurilov.confuse.Config> ctxConfigs)protected voiddoClose()protected voiddoShutdown()protected voiddoStartWrapped()protected voiddoStop()protected voidinitMetrics(int originIndex, OpType opType, int concurrencyLimit, com.github.akurilov.confuse.Config metricsConfig, com.github.akurilov.commons.system.SizeInBytes itemDataSize, boolean outputColorFlag)-
Methods inherited from class com.emc.mongoose.base.load.step.LoadStepBase
avgPeriod, doStart, init, loadStepId, metricsSnapshots, run, runId
-
Methods inherited from class com.emc.mongoose.base.concurrent.DaemonBase
close, closeAll
-
Methods inherited from class com.github.akurilov.commons.concurrent.AsyncRunnableBase
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
isClosed, isInitial, isShutdown, isStarted, isStopped, shutdown, state
-
Methods inherited from interface com.emc.mongoose.base.load.step.LoadStep
await, close, getTypeName, loadStepId, metricsSnapshots, runId, start, stop
-
-
-
-
Constructor Detail
-
LoadStepClientBase
public LoadStepClientBase(com.github.akurilov.confuse.Config config, java.util.List<Extension> extensions, java.util.List<com.github.akurilov.confuse.Config> ctxConfigs, MetricsManager metricsMgr)
-
-
Method Detail
-
doStartWrapped
protected final void doStartWrapped() throws java.lang.IllegalArgumentException- Specified by:
doStartWrappedin classLoadStepBase- Throws:
java.lang.IllegalArgumentException
-
initMetrics
protected final void initMetrics(int originIndex, OpType opType, int concurrencyLimit, com.github.akurilov.confuse.Config metricsConfig, com.github.akurilov.commons.system.SizeInBytes itemDataSize, boolean outputColorFlag)- Specified by:
initMetricsin classLoadStepBase
-
doShutdown
protected final void doShutdown()
- Overrides:
doShutdownin classcom.github.akurilov.commons.concurrent.AsyncRunnableBase
-
await
public final boolean await(long timeout, java.util.concurrent.TimeUnit timeUnit) throws java.lang.IllegalStateException, java.lang.InterruptedException
-
doStop
protected final void doStop()
- Overrides:
doStopin classLoadStepBase
-
doClose
protected final void doClose() throws java.io.IOException- Overrides:
doClosein classLoadStepBase- Throws:
java.io.IOException
-
config
public final <T extends LoadStepClient> T config(java.util.Map<java.lang.String,java.lang.Object> configMap)
Description copied from interface:LoadStepClientConfigure the step- Specified by:
configin interfaceLoadStepClient- Parameters:
configMap- a dictionary of the configuration values to override the inherited config- Returns:
- new/copied step instance with the applied config values
-
append
public final <T extends LoadStepClient> T append(java.util.Map<java.lang.String,java.lang.Object> context)
Description copied from interface:LoadStepClientAppend the load step context. The actual behavior depends on the particular step type- Specified by:
appendin interfaceLoadStepClient- Parameters:
context- a dictionary of the additional parameters handled by the particular load step implementation- Returns:
- new/copied step instance with the appended context
-
copyInstance
protected abstract <T extends LoadStepClient> T copyInstance(com.github.akurilov.confuse.Config config, java.util.List<com.github.akurilov.confuse.Config> ctxConfigs)
-
-