mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2024-11-21 16:27:51 -06:00
rename driver space cache for upcoming changes
This commit is contained in:
parent
4fa93955c0
commit
41b1296469
@ -22,7 +22,7 @@ import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.BaseDriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.StringDriverSpaceCache;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.core.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
@ -41,7 +41,7 @@ public class AmqpDriverAdapter extends BaseDriverAdapter<AmqpTimeTrackOp, AmqpSp
|
||||
|
||||
@Override
|
||||
public OpMapper<AmqpTimeTrackOp> getOpMapper() {
|
||||
DriverSpaceCache<? extends AmqpSpace> spaceCache = getSpaceCache();
|
||||
StringDriverSpaceCache<? extends AmqpSpace> spaceCache = getSpaceCache();
|
||||
NBConfiguration adapterConfig = getConfiguration();
|
||||
return new AmqpOpMapper(this, adapterConfig, spaceCache);
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpDispenser;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.StringDriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.templating.ParsedOp;
|
||||
import io.nosqlbench.engine.api.templating.TypeAndTarget;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
@ -34,10 +34,10 @@ public class AmqpOpMapper implements OpMapper<AmqpTimeTrackOp> {
|
||||
private final static Logger logger = LogManager.getLogger(AmqpOpMapper.class);
|
||||
|
||||
private final NBConfiguration cfg;
|
||||
private final DriverSpaceCache<? extends AmqpSpace> spaceCache;
|
||||
private final StringDriverSpaceCache<? extends AmqpSpace> spaceCache;
|
||||
private final DriverAdapter adapter;
|
||||
|
||||
public AmqpOpMapper(DriverAdapter adapter, NBConfiguration cfg, DriverSpaceCache<? extends AmqpSpace> spaceCache) {
|
||||
public AmqpOpMapper(DriverAdapter adapter, NBConfiguration cfg, StringDriverSpaceCache<? extends AmqpSpace> spaceCache) {
|
||||
this.cfg = cfg;
|
||||
this.spaceCache = spaceCache;
|
||||
this.adapter = adapter;
|
||||
|
@ -22,7 +22,7 @@ import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.BaseDriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.StringDriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.flowtypes.Op;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.core.NBComponent;
|
||||
@ -46,7 +46,7 @@ public class Cqld4DriverAdapter extends BaseDriverAdapter<Op, Cqld4Space> {
|
||||
|
||||
@Override
|
||||
public OpMapper<Op> getOpMapper() {
|
||||
DriverSpaceCache<? extends Cqld4Space> spaceCache = getSpaceCache();
|
||||
StringDriverSpaceCache<? extends Cqld4Space> spaceCache = getSpaceCache();
|
||||
NBConfiguration config = getConfiguration();
|
||||
return new Cqld4CoreOpMapper(this, config, spaceCache);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpDispenser;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.StringDriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.flowtypes.Op;
|
||||
import io.nosqlbench.adapters.api.templating.ParsedOp;
|
||||
import io.nosqlbench.engine.api.templating.TypeAndTarget;
|
||||
@ -35,11 +35,11 @@ public class Cqld4CoreOpMapper implements OpMapper<Op> {
|
||||
|
||||
private final static Logger logger = LogManager.getLogger(Cqld4CoreOpMapper.class);
|
||||
|
||||
private final DriverSpaceCache<? extends Cqld4Space> cache;
|
||||
private final StringDriverSpaceCache<? extends Cqld4Space> cache;
|
||||
private final NBConfiguration cfg;
|
||||
private final DriverAdapter adapter;
|
||||
|
||||
public Cqld4CoreOpMapper(DriverAdapter adapter, NBConfiguration config, DriverSpaceCache<? extends Cqld4Space> cache) {
|
||||
public Cqld4CoreOpMapper(DriverAdapter adapter, NBConfiguration config, StringDriverSpaceCache<? extends Cqld4Space> cache) {
|
||||
this.cfg = config;
|
||||
this.cache = cache;
|
||||
this.adapter = adapter;
|
||||
|
@ -20,7 +20,7 @@ import io.nosqlbench.adapter.dynamodb.optypes.DynamoDBOp;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.BaseDriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.StringDriverSpaceCache;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.core.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Maturity;
|
||||
@ -39,7 +39,7 @@ public class DynamoDBDriverAdapter extends BaseDriverAdapter<DynamoDBOp, DynamoD
|
||||
|
||||
@Override
|
||||
public OpMapper<DynamoDBOp> getOpMapper() {
|
||||
DriverSpaceCache<? extends DynamoDBSpace> spaceCache = getSpaceCache();
|
||||
StringDriverSpaceCache<? extends DynamoDBSpace> spaceCache = getSpaceCache();
|
||||
NBConfiguration adapterConfig = getConfiguration();
|
||||
return new DynamoDBOpMapper(this, adapterConfig, spaceCache);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ import io.nosqlbench.adapter.dynamodb.optypes.DynamoDBOp;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpDispenser;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.StringDriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.templating.ParsedOp;
|
||||
import io.nosqlbench.engine.api.templating.TypeAndTarget;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
@ -30,10 +30,10 @@ import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
public class DynamoDBOpMapper implements OpMapper<DynamoDBOp> {
|
||||
|
||||
private final NBConfiguration cfg;
|
||||
private final DriverSpaceCache<? extends DynamoDBSpace> cache;
|
||||
private final StringDriverSpaceCache<? extends DynamoDBSpace> cache;
|
||||
private final DriverAdapter adapter;
|
||||
|
||||
public DynamoDBOpMapper(DriverAdapter adapter, NBConfiguration cfg, DriverSpaceCache<? extends DynamoDBSpace> cache) {
|
||||
public DynamoDBOpMapper(DriverAdapter adapter, NBConfiguration cfg, StringDriverSpaceCache<? extends DynamoDBSpace> cache) {
|
||||
this.cfg = cfg;
|
||||
this.cache = cache;
|
||||
this.adapter = adapter;
|
||||
|
@ -23,7 +23,7 @@ import io.nosqlbench.nb.api.config.standard.Param;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.BaseDriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.StringDriverSpaceCache;
|
||||
import io.nosqlbench.nb.api.engine.metrics.instruments.MetricCategory;
|
||||
import io.nosqlbench.nb.api.engine.metrics.instruments.NBMetricHistogram;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
@ -55,7 +55,7 @@ public class HttpDriverAdapter extends BaseDriverAdapter<HttpOp, HttpSpace> {
|
||||
|
||||
@Override
|
||||
public OpMapper<HttpOp> getOpMapper() {
|
||||
DriverSpaceCache<? extends HttpSpace> spaceCache = getSpaceCache();
|
||||
StringDriverSpaceCache<? extends HttpSpace> spaceCache = getSpaceCache();
|
||||
NBConfiguration config = getConfiguration();
|
||||
return new HttpOpMapper(this, config, spaceCache);
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ package io.nosqlbench.adapter.http.core;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpDispenser;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.StringDriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.templating.ParsedOp;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
|
||||
@ -28,10 +28,10 @@ import java.util.function.LongFunction;
|
||||
public class HttpOpMapper implements OpMapper<HttpOp> {
|
||||
|
||||
private final NBConfiguration cfg;
|
||||
private final DriverSpaceCache<? extends HttpSpace> spaceCache;
|
||||
private final StringDriverSpaceCache<? extends HttpSpace> spaceCache;
|
||||
private final DriverAdapter adapter;
|
||||
|
||||
public HttpOpMapper(DriverAdapter adapter, NBConfiguration cfg, DriverSpaceCache<? extends HttpSpace> spaceCache) {
|
||||
public HttpOpMapper(DriverAdapter adapter, NBConfiguration cfg, StringDriverSpaceCache<? extends HttpSpace> spaceCache) {
|
||||
this.cfg = cfg;
|
||||
this.spaceCache = spaceCache;
|
||||
this.adapter = adapter;
|
||||
|
@ -24,7 +24,7 @@ import io.nosqlbench.adapters.api.activityconfig.OpsLoader;
|
||||
import io.nosqlbench.adapters.api.activityconfig.yaml.OpTemplate;
|
||||
import io.nosqlbench.adapters.api.activityconfig.yaml.OpTemplateFormat;
|
||||
import io.nosqlbench.adapters.api.activityconfig.yaml.OpsDocList;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.StringDriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.templating.ParsedOp;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
@ -49,7 +49,7 @@ public class HttpOpMapperTest {
|
||||
HttpOpMapperTest.cfg = HttpSpace.getConfigModel().apply(Map.of());
|
||||
HttpOpMapperTest.adapter = new HttpDriverAdapter(new TestComponent("parent","parent"), NBLabels.forKV());
|
||||
HttpOpMapperTest.adapter.applyConfig(HttpOpMapperTest.cfg);
|
||||
final DriverSpaceCache<? extends HttpSpace> cache = HttpOpMapperTest.adapter.getSpaceCache();
|
||||
final StringDriverSpaceCache<? extends HttpSpace> cache = HttpOpMapperTest.adapter.getSpaceCache();
|
||||
HttpOpMapperTest.mapper = new HttpOpMapper(HttpOpMapperTest.adapter, HttpOpMapperTest.cfg, cache);
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.BaseDriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.StringDriverSpaceCache;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.core.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
@ -41,7 +41,7 @@ public class KafkaDriverAdapter extends BaseDriverAdapter<KafkaOp, KafkaSpace> {
|
||||
|
||||
@Override
|
||||
public OpMapper<KafkaOp> getOpMapper() {
|
||||
DriverSpaceCache<? extends KafkaSpace> spaceCache = getSpaceCache();
|
||||
StringDriverSpaceCache<? extends KafkaSpace> spaceCache = getSpaceCache();
|
||||
NBConfiguration adapterConfig = getConfiguration();
|
||||
return new KafkaOpMapper(this, adapterConfig, spaceCache);
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpDispenser;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.StringDriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.templating.ParsedOp;
|
||||
import io.nosqlbench.engine.api.templating.TypeAndTarget;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
@ -34,10 +34,10 @@ public class KafkaOpMapper implements OpMapper<KafkaOp> {
|
||||
private final static Logger logger = LogManager.getLogger(KafkaOpMapper.class);
|
||||
|
||||
private final NBConfiguration cfg;
|
||||
private final DriverSpaceCache<? extends KafkaSpace> spaceCache;
|
||||
private final StringDriverSpaceCache<? extends KafkaSpace> spaceCache;
|
||||
private final DriverAdapter adapter;
|
||||
|
||||
public KafkaOpMapper(DriverAdapter adapter, NBConfiguration cfg, DriverSpaceCache<? extends KafkaSpace> spaceCache) {
|
||||
public KafkaOpMapper(DriverAdapter adapter, NBConfiguration cfg, StringDriverSpaceCache<? extends KafkaSpace> spaceCache) {
|
||||
this.cfg = cfg;
|
||||
this.spaceCache = spaceCache;
|
||||
this.adapter = adapter;
|
||||
|
@ -21,7 +21,7 @@ import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.errors.BasicError;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpDispenser;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.StringDriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.flowtypes.Op;
|
||||
import io.nosqlbench.adapters.api.templating.ParsedOp;
|
||||
import io.nosqlbench.engine.api.templating.TypeAndTarget;
|
||||
@ -36,10 +36,10 @@ public class MongoOpMapper implements OpMapper<Op> {
|
||||
|
||||
private final MongodbDriverAdapter adapter;
|
||||
private final NBConfiguration configuration;
|
||||
private final DriverSpaceCache<? extends MongoSpace> spaceCache;
|
||||
private final StringDriverSpaceCache<? extends MongoSpace> spaceCache;
|
||||
|
||||
public MongoOpMapper(MongodbDriverAdapter adapter, NBConfiguration cfg,
|
||||
DriverSpaceCache<? extends MongoSpace> spaceCache) {
|
||||
StringDriverSpaceCache<? extends MongoSpace> spaceCache) {
|
||||
this.configuration = cfg;
|
||||
this.spaceCache = spaceCache;
|
||||
this.adapter = adapter;
|
||||
|
@ -21,7 +21,7 @@ import io.nosqlbench.adapter.neo4j.ops.Neo4JBaseOp;
|
||||
import io.nosqlbench.adapter.neo4j.types.Neo4JOpType;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpDispenser;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.StringDriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.templating.ParsedOp;
|
||||
import io.nosqlbench.engine.api.templating.TypeAndTarget;
|
||||
|
||||
@ -29,10 +29,10 @@ import java.util.function.LongFunction;
|
||||
|
||||
|
||||
public class Neo4JOpMapper implements OpMapper<Neo4JBaseOp> {
|
||||
private final DriverSpaceCache<? extends Neo4JSpace> cache;
|
||||
private final StringDriverSpaceCache<? extends Neo4JSpace> cache;
|
||||
private final Neo4JDriverAdapter adapter;
|
||||
|
||||
public Neo4JOpMapper(Neo4JDriverAdapter adapter, DriverSpaceCache<? extends Neo4JSpace> cache) {
|
||||
public Neo4JOpMapper(Neo4JDriverAdapter adapter, StringDriverSpaceCache<? extends Neo4JSpace> cache) {
|
||||
this.adapter = adapter;
|
||||
this.cache = cache;
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ import io.nosqlbench.adapter.pulsar.ops.PulsarOp;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.BaseDriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.StringDriverSpaceCache;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.core.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
@ -42,7 +42,7 @@ public class PulsarDriverAdapter extends BaseDriverAdapter<PulsarOp, PulsarSpace
|
||||
|
||||
@Override
|
||||
public OpMapper<PulsarOp> getOpMapper() {
|
||||
DriverSpaceCache<? extends PulsarSpace> spaceCache = getSpaceCache();
|
||||
StringDriverSpaceCache<? extends PulsarSpace> spaceCache = getSpaceCache();
|
||||
NBConfiguration adapterConfig = getConfiguration();
|
||||
return new PulsarOpMapper(this, adapterConfig, spaceCache);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpDispenser;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.StringDriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.templating.ParsedOp;
|
||||
import io.nosqlbench.engine.api.templating.TypeAndTarget;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
@ -33,10 +33,10 @@ public class PulsarOpMapper implements OpMapper<PulsarOp> {
|
||||
private final static Logger logger = LogManager.getLogger(PulsarOpMapper.class);
|
||||
|
||||
private final NBConfiguration cfg;
|
||||
private final DriverSpaceCache<? extends PulsarSpace> spaceCache;
|
||||
private final StringDriverSpaceCache<? extends PulsarSpace> spaceCache;
|
||||
private final DriverAdapter adapter;
|
||||
|
||||
public PulsarOpMapper(DriverAdapter adapter, NBConfiguration cfg, DriverSpaceCache<? extends PulsarSpace> spaceCache) {
|
||||
public PulsarOpMapper(DriverAdapter adapter, NBConfiguration cfg, StringDriverSpaceCache<? extends PulsarSpace> spaceCache) {
|
||||
this.cfg = cfg;
|
||||
this.spaceCache = spaceCache;
|
||||
this.adapter = adapter;
|
||||
|
@ -22,7 +22,7 @@ import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.BaseDriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.StringDriverSpaceCache;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.core.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
@ -41,7 +41,7 @@ public class S4JDriverAdapter extends BaseDriverAdapter<S4JOp, S4JSpace> {
|
||||
|
||||
@Override
|
||||
public OpMapper<S4JOp> getOpMapper() {
|
||||
DriverSpaceCache<? extends S4JSpace> spaceCache = getSpaceCache();
|
||||
StringDriverSpaceCache<? extends S4JSpace> spaceCache = getSpaceCache();
|
||||
NBConfiguration adapterConfig = getConfiguration();
|
||||
return new S4JOpMapper(this, adapterConfig, spaceCache);
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpDispenser;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.StringDriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.templating.ParsedOp;
|
||||
import io.nosqlbench.engine.api.templating.TypeAndTarget;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
@ -34,10 +34,10 @@ public class S4JOpMapper implements OpMapper<S4JOp> {
|
||||
private final static Logger logger = LogManager.getLogger(S4JOpMapper.class);
|
||||
|
||||
private final NBConfiguration cfg;
|
||||
private final DriverSpaceCache<? extends S4JSpace> spaceCache;
|
||||
private final StringDriverSpaceCache<? extends S4JSpace> spaceCache;
|
||||
private final DriverAdapter adapter;
|
||||
|
||||
public S4JOpMapper(DriverAdapter adapter, NBConfiguration cfg, DriverSpaceCache<? extends S4JSpace> spaceCache) {
|
||||
public S4JOpMapper(DriverAdapter adapter, NBConfiguration cfg, StringDriverSpaceCache<? extends S4JSpace> spaceCache) {
|
||||
this.cfg = cfg;
|
||||
this.spaceCache = spaceCache;
|
||||
this.adapter = adapter;
|
||||
|
@ -22,7 +22,7 @@ import io.nosqlbench.adapters.api.activityconfig.yaml.OpsDocList;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.BaseDriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.StringDriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.decorators.SyntheticOpTemplateProvider;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.core.NBComponent;
|
||||
@ -48,7 +48,7 @@ public class StdoutDriverAdapter extends BaseDriverAdapter<StdoutOp, StdoutSpace
|
||||
|
||||
@Override
|
||||
public OpMapper<StdoutOp> getOpMapper() {
|
||||
DriverSpaceCache<? extends StdoutSpace> ctxCache = getSpaceCache();
|
||||
StringDriverSpaceCache<? extends StdoutSpace> ctxCache = getSpaceCache();
|
||||
return new StdoutOpMapper(this, ctxCache);
|
||||
}
|
||||
|
||||
|
@ -19,17 +19,17 @@ package io.nosqlbench.adapter.stdout;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpDispenser;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.StringDriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.templating.ParsedOp;
|
||||
|
||||
import java.util.function.LongFunction;
|
||||
|
||||
public class StdoutOpMapper implements OpMapper<StdoutOp> {
|
||||
|
||||
private final DriverSpaceCache<? extends StdoutSpace> ctxcache;
|
||||
private final StringDriverSpaceCache<? extends StdoutSpace> ctxcache;
|
||||
private final DriverAdapter adapter;
|
||||
|
||||
public StdoutOpMapper(DriverAdapter adapter, DriverSpaceCache<? extends StdoutSpace> ctxcache) {
|
||||
public StdoutOpMapper(DriverAdapter adapter, StringDriverSpaceCache<? extends StdoutSpace> ctxcache) {
|
||||
this.ctxcache = ctxcache;
|
||||
this.adapter = adapter;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ import io.nosqlbench.adapters.api.activityconfig.yaml.OpsDocList;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.BaseDriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.StringDriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.decorators.SyntheticOpTemplateProvider;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.core.NBComponent;
|
||||
@ -49,7 +49,7 @@ public class TcpClientDriverAdapter extends BaseDriverAdapter<TcpClientOp, TcpCl
|
||||
|
||||
@Override
|
||||
public OpMapper<TcpClientOp> getOpMapper() {
|
||||
DriverSpaceCache<? extends TcpClientAdapterSpace> ctxCache = getSpaceCache();
|
||||
StringDriverSpaceCache<? extends TcpClientAdapterSpace> ctxCache = getSpaceCache();
|
||||
return new TcpClientOpMapper(this,ctxCache);
|
||||
}
|
||||
|
||||
|
@ -18,18 +18,18 @@ package io.nosqlbench.adapter.tcpclient;
|
||||
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpDispenser;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.StringDriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.templating.ParsedOp;
|
||||
|
||||
import java.util.function.LongFunction;
|
||||
|
||||
public class TcpClientOpMapper implements OpMapper<TcpClientOp> {
|
||||
|
||||
private final DriverSpaceCache<? extends TcpClientAdapterSpace> ctxcache;
|
||||
private final StringDriverSpaceCache<? extends TcpClientAdapterSpace> ctxcache;
|
||||
private final TcpClientDriverAdapter adapter;
|
||||
|
||||
|
||||
public TcpClientOpMapper(TcpClientDriverAdapter adapter, DriverSpaceCache<? extends TcpClientAdapterSpace> ctxcache) {
|
||||
public TcpClientOpMapper(TcpClientDriverAdapter adapter, StringDriverSpaceCache<? extends TcpClientAdapterSpace> ctxcache) {
|
||||
this.ctxcache = ctxcache;
|
||||
this.adapter = adapter;
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ import io.nosqlbench.adapters.api.activityconfig.yaml.OpsDocList;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.BaseDriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.StringDriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.decorators.SyntheticOpTemplateProvider;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.core.NBComponent;
|
||||
@ -48,7 +48,7 @@ public class TcpServerDriverAdapter extends BaseDriverAdapter<TcpServerOp, TcpSe
|
||||
|
||||
@Override
|
||||
public OpMapper<TcpServerOp> getOpMapper() {
|
||||
DriverSpaceCache<? extends TcpServerAdapterSpace> ctxCache = getSpaceCache();
|
||||
StringDriverSpaceCache<? extends TcpServerAdapterSpace> ctxCache = getSpaceCache();
|
||||
return new TcpServerOpMapper(this,ctxCache);
|
||||
}
|
||||
|
||||
|
@ -18,18 +18,18 @@ package io.nosqlbench.adapter.tcpserver;
|
||||
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpDispenser;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.StringDriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.templating.ParsedOp;
|
||||
|
||||
import java.util.function.LongFunction;
|
||||
|
||||
public class TcpServerOpMapper implements OpMapper<TcpServerOp> {
|
||||
|
||||
private final DriverSpaceCache<? extends TcpServerAdapterSpace> ctxcache;
|
||||
private final StringDriverSpaceCache<? extends TcpServerAdapterSpace> ctxcache;
|
||||
private final TcpServerDriverAdapter adapter;
|
||||
|
||||
|
||||
public TcpServerOpMapper(TcpServerDriverAdapter adapter, DriverSpaceCache<? extends TcpServerAdapterSpace> ctxcache) {
|
||||
public TcpServerOpMapper(TcpServerDriverAdapter adapter, StringDriverSpaceCache<? extends TcpServerAdapterSpace> ctxcache) {
|
||||
this.ctxcache = ctxcache;
|
||||
this.adapter = adapter;
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ import java.util.stream.Collectors;
|
||||
public abstract class BaseDriverAdapter<R extends Op, S> extends NBBaseComponent implements DriverAdapter<R, S>, NBConfigurable, NBReconfigurable {
|
||||
private final static Logger logger = LogManager.getLogger("ADAPTER");
|
||||
|
||||
private DriverSpaceCache<? extends S> spaceCache;
|
||||
private StringDriverSpaceCache<? extends S> spaceCache;
|
||||
private NBConfiguration cfg;
|
||||
private LongFunction<S> spaceF;
|
||||
|
||||
@ -129,9 +129,9 @@ public abstract class BaseDriverAdapter<R extends Op, S> extends NBBaseComponent
|
||||
}
|
||||
|
||||
@Override
|
||||
public final synchronized DriverSpaceCache<? extends S> getSpaceCache() {
|
||||
public final synchronized StringDriverSpaceCache<? extends S> getSpaceCache() {
|
||||
if (spaceCache == null) {
|
||||
spaceCache = new DriverSpaceCache<>(this, getSpaceInitializer(getConfiguration()));
|
||||
spaceCache = new StringDriverSpaceCache<>(this, getSpaceInitializer(getConfiguration()));
|
||||
}
|
||||
return spaceCache;
|
||||
}
|
||||
@ -193,7 +193,7 @@ public abstract class BaseDriverAdapter<R extends Op, S> extends NBBaseComponent
|
||||
@Override
|
||||
public LongFunction<S> getSpaceFunc(ParsedOp pop) {
|
||||
LongFunction<String> spaceNameF = pop.getAsFunctionOr("space", "default");
|
||||
DriverSpaceCache<? extends S> cache = getSpaceCache();
|
||||
StringDriverSpaceCache<? extends S> cache = getSpaceCache();
|
||||
return l -> getSpaceCache().get(spaceNameF.apply(l));
|
||||
}
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ public interface DriverAdapter<OPTYPE extends Op, SPACETYPE> extends NBComponent
|
||||
* things needed by operations, or things needed during the
|
||||
* construction of operations.
|
||||
*
|
||||
* See {@link DriverSpaceCache} for details on when and how to use this function.
|
||||
* See {@link StringDriverSpaceCache} for details on when and how to use this function.
|
||||
*
|
||||
* <p>During Adapter Initialization, Op Mapping, Op Synthesis, or Op Execution,
|
||||
* you may need access to the objects in (the or a) space cache. You can build the
|
||||
@ -146,7 +146,7 @@ public interface DriverAdapter<OPTYPE extends Op, SPACETYPE> extends NBComponent
|
||||
*
|
||||
* @return A cache of named objects
|
||||
*/
|
||||
DriverSpaceCache<? extends SPACETYPE> getSpaceCache();
|
||||
StringDriverSpaceCache<? extends SPACETYPE> getSpaceCache();
|
||||
|
||||
/**
|
||||
* This method allows each driver adapter to create named state which is automatically
|
||||
|
@ -46,13 +46,13 @@ import java.util.function.Function;
|
||||
* @param <S>
|
||||
* The type which will represent the cache for a given type of adapter.
|
||||
*/
|
||||
public class DriverSpaceCache<S> extends NBBaseComponent {
|
||||
public class StringDriverSpaceCache<S> extends NBBaseComponent {
|
||||
|
||||
private final ConcurrentHashMap<String, S> cache = new ConcurrentHashMap<>();
|
||||
|
||||
private final Function<String, S> newSpaceFunction;
|
||||
|
||||
public DriverSpaceCache(NBComponent parent, Function<String, S> newSpaceFunction) {
|
||||
public StringDriverSpaceCache(NBComponent parent, Function<String, S> newSpaceFunction) {
|
||||
super(parent);
|
||||
this.newSpaceFunction = newSpaceFunction;
|
||||
this.create().gauge(
|
Loading…
Reference in New Issue
Block a user