io.nosqlbench.engine.api.activityimpl.uniform.StandardActivity Maven / Gradle / Ivy
package io.nosqlbench.engine.api.activityimpl.uniform;
/*
* Copyright (c) 2022 nosqlbench
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import io.nosqlbench.engine.api.activityapi.errorhandling.modular.NBErrorHandler;
import io.nosqlbench.engine.api.activityapi.planning.OpSequence;
import io.nosqlbench.engine.api.activityapi.planning.OpSource;
import io.nosqlbench.engine.api.activityimpl.ActivityDef;
import io.nosqlbench.engine.api.activityimpl.OpDispenser;
import io.nosqlbench.engine.api.activityimpl.SimpleActivity;
import io.nosqlbench.engine.api.activityimpl.uniform.flowtypes.Op;
import io.nosqlbench.engine.api.templating.ParsedOp;
import io.nosqlbench.nb.api.errors.OpConfigError;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
/**
* This is a typed activity which is expected to be come the standard
* core of all new activity types. Extant NB drivers should also migrate
* to this when possible.
*
* @param A type of runnable which wraps the operations for this type of driver.
*/
public class StandardActivity extends SimpleActivity {
private final DriverAdapter adapter;
private final OpSource opsource;
private NBErrorHandler errorHandler;
OpSequence> sequence;
public StandardActivity(DriverAdapter adapter, ActivityDef activityDef) {
super(activityDef);
this.adapter = adapter;
try {
Function> opmapper = adapter.getOpMapper();
Function
© 2015 - 2025 Weber Informatics LLC | Privacy Policy