Class S4JBaseOpDispenser
java.lang.Object
io.nosqlbench.nb.api.components.core.NBBaseComponentMetrics
io.nosqlbench.nb.api.components.core.NBBaseComponent
io.nosqlbench.adapters.api.activityimpl.BaseOpDispenser<S4JOp,S4JSpace>
io.nosqlbench.adapter.s4j.dispensers.S4JBaseOpDispenser
- All Implemented Interfaces:
OpDispenser<S4JOp>,OpResultTracker,NBComponent,NBComponentAdvisors,NBComponentEvents,NBComponentMetrics,NBComponentProps,NBComponentServices,NBComponentTimeline,NBProviderSearch,NBTokenWords,NBLabeledElement,AutoCloseable,LongFunction<S4JOp>
- Direct Known Subclasses:
MessageConsumerOpDispenser,MessageProducerOpDispenser
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.nosqlbench.nb.api.labels.NBLabeledElement
NBLabeledElement.BasicLabeledElement -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanprotected final LongFunction<String> protected final Stringprotected final ParsedOpprotected final S4JAdapterMetricsprotected final LongFunction<S4JSpace> protected final booleanprotected final longprotected final intprotected final intFields inherited from class io.nosqlbench.adapters.api.activityimpl.BaseOpDispenser
EXPECTED_RESULT, spaceF, START_TIMERS, STOP_TIMERS, VERIFIER, VERIFIER_IMPORTS, VERIFIER_INIT, verifierTimerFields inherited from class io.nosqlbench.nb.api.components.core.NBBaseComponent
bufferOrphanedMetrics, closed_ns, error, errored_ns, metricsBuffer, parent, started_epoch_ms, started_ns, state, teardown_nsFields inherited from interface io.nosqlbench.nb.api.components.core.NBComponent
EMPTY_COMPONENTFields inherited from interface io.nosqlbench.nb.api.components.core.NBComponentProps
HDRDIGITS, SUMMARYFields inherited from interface io.nosqlbench.nb.api.labels.NBLabeledElement
EMPTY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedS4JBaseOpDispenser(S4JDriverAdapter adapter, ParsedOp op, LongFunction<String> destNameStrFunc) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancommitTransaction(int txnBatchNum, int jmsSessionMode, long curCycleNum) javax.jms.JMSConsumergetJmsConsumer(long curCycle, S4JJMSContextWrapper s4JJMSContextWrapper, javax.jms.Destination destination, String destType, String subName, String msgSelector, float msgAckRatio, boolean nonLocal, boolean durable, boolean shared, boolean asyncApi, int slowAckInSec) If the JMS consumer that corresponds to a destination(, subscription, message selector) exists, reuse it; Otherwise, create itjavax.jms.DestinationgetJmsDestination(long curCycle, S4JJMSContextWrapper s4JJMSContextWrapper, boolean tempDest, String destType, String destName) If the JMS destination that corresponds to a topic exists, reuse it; Otherwise, create itjavax.jms.JMSProducergetJmsProducer(long curCycle, S4JJMSContextWrapper s4JJMSContextWrapper, boolean asyncApi) If the JMS producer that corresponds to a destination exists, reuse it; Otherwise, create itgetS4jJmsContextWrapper(long curCycle) getS4jJmsContextWrapper(long curCycle, Map<String, Object> overrideS4jConfMap) protected LongFunction<String> lookupMandtoryStrOpValueFunc(String paramName) protected LongFunction<String> lookupOptionalStrOpValueFunc(String paramName) protected LongFunction<String> lookupOptionalStrOpValueFunc(String paramName, String defaultValue) protected LongFunction<Boolean> lookupStaticBoolConfigValueFunc(String paramName, boolean defaultValue) protected LongFunction<Integer> lookupStaticIntOpValueFunc(String paramName, int defaultValue) protected LongFunction<Set<String>> lookupStaticStrSetOpValueFunc(String paramName) Methods inherited from class io.nosqlbench.adapters.api.activityimpl.BaseOpDispenser
apply, getLabels, getOpName, getVerifier, onError, onStart, onSuccessMethods inherited from class io.nosqlbench.nb.api.components.core.NBBaseComponent
addAdvisor, addMetricsCloseable, attachChild, beforeDetach, close, create, detachChild, find, findParentService, getAdvisors, getChildren, getComponentOnlyLabels, getComponentProp, getComponentState, getNanosSinceStart, getParent, getTokens, nanosof_close, nanosof_error, nanosof_start, nanosof_teardown, onError, onEvent, reportExecutionMetric, setComponentProp, started_epoch_ms, teardown, toStringMethods inherited from class io.nosqlbench.nb.api.components.core.NBBaseComponentMetrics
addComponentMetric, addListener, findComponentMetrics, findComponentMetrics, getComponentMetric, getComponentMetrics, removeListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.nosqlbench.nb.api.components.core.NBComponentAdvisors
getAdvisorResultsMethods inherited from interface io.nosqlbench.nb.api.components.core.NBComponentMetrics
addComponentMetric, findComponentMetrics, findComponentMetrics, findOneComponentMetric, findOneComponentMetric, getComponentMetric, getComponentMetricsMethods inherited from interface io.nosqlbench.nb.api.labels.NBLabeledElement
descriptionMethods inherited from interface io.nosqlbench.adapters.api.activityimpl.OpDispenser
getOp
-
Field Details
-
parsedOp
-
s4jAdapterMetrics
-
temporaryDest
protected final boolean temporaryDest -
destType
-
asyncAPI
protected final boolean asyncAPI -
txnBatchNum
protected final int txnBatchNum -
destNameStrFunc
-
totalThreadNum
protected final int totalThreadNum -
totalCycleNum
protected final long totalCycleNum -
s4jSpaceF
-
-
Constructor Details
-
S4JBaseOpDispenser
protected S4JBaseOpDispenser(S4JDriverAdapter adapter, ParsedOp op, LongFunction<String> destNameStrFunc)
-
-
Method Details
-
getS4jAdapterMetrics
-
lookupStaticBoolConfigValueFunc
protected LongFunction<Boolean> lookupStaticBoolConfigValueFunc(String paramName, boolean defaultValue) -
lookupStaticStrSetOpValueFunc
-
lookupStaticIntOpValueFunc
-
lookupOptionalStrOpValueFunc
-
lookupOptionalStrOpValueFunc
-
lookupMandtoryStrOpValueFunc
-
getS4jJmsContextWrapper
-
getS4jJmsContextWrapper
public S4JJMSContextWrapper getS4jJmsContextWrapper(long curCycle, Map<String, Object> overrideS4jConfMap) -
getJmsDestination
public javax.jms.Destination getJmsDestination(long curCycle, S4JJMSContextWrapper s4JJMSContextWrapper, boolean tempDest, String destType, String destName) throws javax.jms.JMSRuntimeException If the JMS destination that corresponds to a topic exists, reuse it; Otherwise, create it- Throws:
javax.jms.JMSRuntimeException
-
getJmsProducer
public javax.jms.JMSProducer getJmsProducer(long curCycle, S4JJMSContextWrapper s4JJMSContextWrapper, boolean asyncApi) throws javax.jms.JMSException If the JMS producer that corresponds to a destination exists, reuse it; Otherwise, create it- Throws:
javax.jms.JMSException
-
getJmsConsumer
public javax.jms.JMSConsumer getJmsConsumer(long curCycle, S4JJMSContextWrapper s4JJMSContextWrapper, javax.jms.Destination destination, String destType, String subName, String msgSelector, float msgAckRatio, boolean nonLocal, boolean durable, boolean shared, boolean asyncApi, int slowAckInSec) throws javax.jms.JMSException If the JMS consumer that corresponds to a destination(, subscription, message selector) exists, reuse it; Otherwise, create it- Throws:
javax.jms.JMSException
-
commitTransaction
protected boolean commitTransaction(int txnBatchNum, int jmsSessionMode, long curCycleNum)
-