mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
all adapters loading indirectly
This commit is contained in:
parent
61b923cfed
commit
92377b636c
@ -57,12 +57,4 @@ public class AmqpDriverAdapter extends BaseDriverAdapter<AmqpTimeTrackOp, AmqpSp
|
||||
return super.getConfigModel().add(AmqpSpace.getConfigModel());
|
||||
}
|
||||
|
||||
@Service(value = DriverAdapterLoader.class,selector = "amqp")
|
||||
public static class Loader implements DriverAdapterLoader {
|
||||
@Override
|
||||
public AmqpDriverAdapter load(NBComponent parent, NBLabels childLabels) {
|
||||
return new AmqpDriverAdapter(parent,childLabels);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,14 @@
|
||||
package io.nosqlbench.adapter.amqp;
|
||||
|
||||
import io.nosqlbench.adapter.diag.DriverAdapterLoader;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
|
||||
@Service(value = DriverAdapterLoader.class, selector = "amqp")
|
||||
public class AmqpDriverAdapterLoader implements DriverAdapterLoader {
|
||||
@Override
|
||||
public AmqpDriverAdapter load(NBComponent parent, NBLabels childLabels) {
|
||||
return new AmqpDriverAdapter(parent, childLabels);
|
||||
}
|
||||
}
|
@ -109,12 +109,4 @@ public class Cqld4DriverAdapter extends BaseDriverAdapter<Op, Cqld4Space> {
|
||||
return remappers;
|
||||
}
|
||||
|
||||
@Service(value = DriverAdapterLoader.class,selector = "cqld4")
|
||||
public static class Loader implements DriverAdapterLoader {
|
||||
@Override
|
||||
public Cqld4DriverAdapter load(NBComponent parent, NBLabels childLabels) {
|
||||
return new Cqld4DriverAdapter(parent,childLabels);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,14 @@
|
||||
package io.nosqlbench.adapter.cqld4;
|
||||
|
||||
import io.nosqlbench.adapter.diag.DriverAdapterLoader;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
|
||||
@Service(value = DriverAdapterLoader.class, selector = "cqld4")
|
||||
public class Cqld4DriverAdapterLoader implements DriverAdapterLoader {
|
||||
@Override
|
||||
public Cqld4DriverAdapter load(NBComponent parent, NBLabels childLabels) {
|
||||
return new Cqld4DriverAdapter(parent, childLabels);
|
||||
}
|
||||
}
|
@ -1,5 +1,23 @@
|
||||
package io.nosqlbench.adapter.diag;
|
||||
|
||||
/*
|
||||
* 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.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
|
@ -55,12 +55,4 @@ public class DynamoDBDriverAdapter extends BaseDriverAdapter<DynamoDBOp, DynamoD
|
||||
return super.getConfigModel().add(DynamoDBSpace.getConfigModel());
|
||||
}
|
||||
|
||||
@Service(value = DriverAdapterLoader.class,selector = "dynamodb")
|
||||
public static class Loader implements DriverAdapterLoader {
|
||||
@Override
|
||||
public DynamoDBDriverAdapter load(NBComponent parent, NBLabels childLabels) {
|
||||
return new DynamoDBDriverAdapter(parent,childLabels);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,14 @@
|
||||
package io.nosqlbench.adapter.dynamodb;
|
||||
|
||||
import io.nosqlbench.adapter.diag.DriverAdapterLoader;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
|
||||
@Service(value = DriverAdapterLoader.class, selector = "dynamodb")
|
||||
public class DynamoDBDriverAdapterLoader implements DriverAdapterLoader {
|
||||
@Override
|
||||
public DynamoDBDriverAdapter load(NBComponent parent, NBLabels childLabels) {
|
||||
return new DynamoDBDriverAdapter(parent, childLabels);
|
||||
}
|
||||
}
|
@ -85,12 +85,4 @@ public class HttpDriverAdapter extends BaseDriverAdapter<HttpOp, HttpSpace> {
|
||||
return super.getConfigModel().add(HttpSpace.getConfigModel()).add(thisCfgModel);
|
||||
}
|
||||
|
||||
@Service(value = DriverAdapterLoader.class,selector = "http")
|
||||
public static class Loader implements DriverAdapterLoader {
|
||||
@Override
|
||||
public HttpDriverAdapter load(NBComponent parent, NBLabels childLabels) {
|
||||
return new HttpDriverAdapter(parent,childLabels);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,14 @@
|
||||
package io.nosqlbench.adapter.http;
|
||||
|
||||
import io.nosqlbench.adapter.diag.DriverAdapterLoader;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
|
||||
@Service(value = DriverAdapterLoader.class, selector = "http")
|
||||
public class HttpDriverAdapterLoader implements DriverAdapterLoader {
|
||||
@Override
|
||||
public HttpDriverAdapter load(NBComponent parent, NBLabels childLabels) {
|
||||
return new HttpDriverAdapter(parent, childLabels);
|
||||
}
|
||||
}
|
@ -56,12 +56,5 @@ public class KafkaDriverAdapter extends BaseDriverAdapter<KafkaOp, KafkaSpace> {
|
||||
public NBConfigModel getConfigModel() {
|
||||
return super.getConfigModel().add(KafkaSpace.getConfigModel());
|
||||
}
|
||||
@Service(value = DriverAdapterLoader.class,selector = "kafka")
|
||||
public static class Loader implements DriverAdapterLoader {
|
||||
@Override
|
||||
public KafkaDriverAdapter load(NBComponent parent, NBLabels childLabels) {
|
||||
return new KafkaDriverAdapter(parent,childLabels);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,14 @@
|
||||
package io.nosqlbench.adapter.kafka;
|
||||
|
||||
import io.nosqlbench.adapter.diag.DriverAdapterLoader;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
|
||||
@Service(value = DriverAdapterLoader.class, selector = "kafka")
|
||||
public class KafkaDriverAdapterLoader implements DriverAdapterLoader {
|
||||
@Override
|
||||
public KafkaDriverAdapter load(NBComponent parent, NBLabels childLabels) {
|
||||
return new KafkaDriverAdapter(parent, childLabels);
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package io.nosqlbench.adapter.mongodb.core;
|
||||
|
||||
import io.nosqlbench.adapter.diag.DriverAdapterLoader;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
|
||||
@Service(value = DriverAdapterLoader.class, selector = "mongodb")
|
||||
public class KafkaDriverAdapterLoader implements DriverAdapterLoader {
|
||||
@Override
|
||||
public MongodbDriverAdapter load(NBComponent parent, NBLabels childLabels) {
|
||||
return new MongodbDriverAdapter(parent, childLabels);
|
||||
}
|
||||
}
|
@ -54,12 +54,4 @@ public class MongodbDriverAdapter extends BaseDriverAdapter<Op, MongoSpace> {
|
||||
return super.getConfigModel().add(MongoSpace.getConfigModel());
|
||||
}
|
||||
|
||||
@Service(value = DriverAdapterLoader.class,selector = "mongodb")
|
||||
public static class Loader implements DriverAdapterLoader {
|
||||
@Override
|
||||
public MongodbDriverAdapter load(NBComponent parent, NBLabels childLabels) {
|
||||
return new MongodbDriverAdapter(parent,childLabels);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,14 @@
|
||||
package io.nosqlbench.adapter.pgvector;
|
||||
|
||||
import io.nosqlbench.adapter.diag.DriverAdapterLoader;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
|
||||
@Service(value = DriverAdapterLoader.class, selector = "jdbc")
|
||||
public class PGVectorDriverAdapterLoader implements DriverAdapterLoader {
|
||||
@Override
|
||||
public PGVectorDriverAdapter load(NBComponent parent, NBLabels childLabels) {
|
||||
return new PGVectorDriverAdapter(parent, childLabels);
|
||||
}
|
||||
}
|
@ -54,12 +54,4 @@ public class PineconeDriverAdapter extends BaseDriverAdapter<PineconeOp, Pinecon
|
||||
return super.getConfigModel().add(PineconeSpace.getConfigModel());
|
||||
}
|
||||
|
||||
@Service(value = DriverAdapterLoader.class,selector = "pinecone")
|
||||
public static class Loader implements DriverAdapterLoader {
|
||||
@Override
|
||||
public PineconeDriverAdapter load(NBComponent parent, NBLabels childLabels) {
|
||||
return new PineconeDriverAdapter(parent,childLabels);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,14 @@
|
||||
package io.nosqlbench.adapter.pinecone;
|
||||
|
||||
import io.nosqlbench.adapter.diag.DriverAdapterLoader;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
|
||||
@Service(value = DriverAdapterLoader.class, selector = "pinecone")
|
||||
public class PineconeDriverAdapterLoader implements DriverAdapterLoader {
|
||||
@Override
|
||||
public PineconeDriverAdapter load(NBComponent parent, NBLabels childLabels) {
|
||||
return new PineconeDriverAdapter(parent, childLabels);
|
||||
}
|
||||
}
|
@ -58,12 +58,4 @@ public class PulsarDriverAdapter extends BaseDriverAdapter<PulsarOp, PulsarSpace
|
||||
return super.getConfigModel().add(PulsarSpace.getConfigModel());
|
||||
}
|
||||
|
||||
@Service(value = DriverAdapterLoader.class,selector = "pulsar")
|
||||
public static class Loader implements DriverAdapterLoader {
|
||||
@Override
|
||||
public PulsarDriverAdapter load(NBComponent parent, NBLabels childLabels) {
|
||||
return new PulsarDriverAdapter(parent,childLabels);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,14 @@
|
||||
package io.nosqlbench.adapter.pulsar;
|
||||
|
||||
import io.nosqlbench.adapter.diag.DriverAdapterLoader;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
|
||||
@Service(value = DriverAdapterLoader.class, selector = "pulsar")
|
||||
public class PulsarDriverAdapterLoader implements DriverAdapterLoader {
|
||||
@Override
|
||||
public PulsarDriverAdapter load(NBComponent parent, NBLabels childLabels) {
|
||||
return new PulsarDriverAdapter(parent, childLabels);
|
||||
}
|
||||
}
|
@ -57,12 +57,4 @@ public class S4JDriverAdapter extends BaseDriverAdapter<S4JOp, S4JSpace> {
|
||||
return super.getConfigModel().add(S4JSpace.getConfigModel());
|
||||
}
|
||||
|
||||
@Service(value = DriverAdapterLoader.class,selector = "s4j")
|
||||
public static class Loader implements DriverAdapterLoader {
|
||||
@Override
|
||||
public S4JDriverAdapter load(NBComponent parent, NBLabels childLabels) {
|
||||
return new S4JDriverAdapter(parent,childLabels);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,14 @@
|
||||
package io.nosqlbench.adapter.s4j;
|
||||
|
||||
import io.nosqlbench.adapter.diag.DriverAdapterLoader;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
|
||||
@Service(value = DriverAdapterLoader.class, selector = "s4j")
|
||||
public class S4JDriverAdapterLoader implements DriverAdapterLoader {
|
||||
@Override
|
||||
public S4JDriverAdapter load(NBComponent parent, NBLabels childLabels) {
|
||||
return new S4JDriverAdapter(parent, childLabels);
|
||||
}
|
||||
}
|
@ -116,13 +116,5 @@ public class StdoutDriverAdapter extends BaseDriverAdapter<StdoutOp, StdoutSpace
|
||||
return stmtTemplate;
|
||||
}
|
||||
|
||||
@Service(value = DriverAdapterLoader.class,selector = "stdout")
|
||||
public static class Loader implements DriverAdapterLoader {
|
||||
@Override
|
||||
public StdoutDriverAdapter load(NBComponent parent, NBLabels childLabels) {
|
||||
return new StdoutDriverAdapter(parent,childLabels);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,14 @@
|
||||
package io.nosqlbench.adapter.stdout;
|
||||
|
||||
import io.nosqlbench.adapter.diag.DriverAdapterLoader;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
|
||||
@Service(value = DriverAdapterLoader.class, selector = "stdout")
|
||||
public class StdoutDriverAdapterLoader implements DriverAdapterLoader {
|
||||
@Override
|
||||
public StdoutDriverAdapter load(NBComponent parent, NBLabels childLabels) {
|
||||
return new StdoutDriverAdapter(parent, childLabels);
|
||||
}
|
||||
}
|
@ -71,12 +71,4 @@ public class TcpClientDriverAdapter extends BaseDriverAdapter<TcpClientOp, TcpCl
|
||||
return adap.getSyntheticOpTemplates(opsDocList, cfg);
|
||||
}
|
||||
|
||||
@Service(value = DriverAdapterLoader.class,selector = "tcpclient")
|
||||
public static class Loader implements DriverAdapterLoader {
|
||||
@Override
|
||||
public TcpClientDriverAdapter load(NBComponent parent, NBLabels childLabels) {
|
||||
return new TcpClientDriverAdapter(parent,childLabels);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,14 @@
|
||||
package io.nosqlbench.adapter.tcpclient;
|
||||
|
||||
import io.nosqlbench.adapter.diag.DriverAdapterLoader;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
|
||||
@Service(value = DriverAdapterLoader.class, selector = "tcpclient")
|
||||
public class TcpClientDriverAdapterLoader implements DriverAdapterLoader {
|
||||
@Override
|
||||
public TcpClientDriverAdapter load(NBComponent parent, NBLabels childLabels) {
|
||||
return new TcpClientDriverAdapter(parent, childLabels);
|
||||
}
|
||||
}
|
@ -16,6 +16,7 @@
|
||||
|
||||
package io.nosqlbench.engine.core.lifecycle.activity;
|
||||
|
||||
import io.nosqlbench.adapter.diag.DriverAdapterLoader;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.api.content.Content;
|
||||
@ -43,6 +44,7 @@ public class ActivityTypeLoader {
|
||||
private static final Logger logger = LogManager.getLogger(ActivityTypeLoader.class);
|
||||
private final SimpleServiceLoader<ActivityType> ACTIVITYTYPE_SPI_FINDER = new SimpleServiceLoader<ActivityType>(ActivityType.class, Maturity.Any);
|
||||
private final SimpleServiceLoader<DriverAdapter> DRIVERADAPTER_SPI_FINDER = new SimpleServiceLoader<>(DriverAdapter.class, Maturity.Any);
|
||||
private final SimpleServiceLoader<DriverAdapterLoader> DRIVERADAPTERLOADER_SPI_FINDER = new SimpleServiceLoader<>(DriverAdapterLoader.class, Maturity.Any);
|
||||
private final Set<URL> jarUrls = new HashSet<>();
|
||||
|
||||
public ActivityTypeLoader setMaturity(final Maturity maturity) {
|
||||
@ -153,11 +155,12 @@ public class ActivityTypeLoader {
|
||||
}
|
||||
|
||||
public Set<String> getAllSelectors() {
|
||||
final Map<String, Maturity> allSelectors = this.ACTIVITYTYPE_SPI_FINDER.getAllSelectors();
|
||||
final Map<String, Maturity> addAdapters = this.DRIVERADAPTER_SPI_FINDER.getAllSelectors();
|
||||
// final Map<String, Maturity> allSelectors = this.ACTIVITYTYPE_SPI_FINDER.getAllSelectors();
|
||||
// final Map<String, Maturity> allAdapters = this.DRIVERADAPTER_SPI_FINDER.getAllSelectors();
|
||||
final Map<String, Maturity> allAdapterLoaders = this.DRIVERADAPTERLOADER_SPI_FINDER.getAllSelectors();
|
||||
final Set<String> all = new LinkedHashSet<>();
|
||||
all.addAll(allSelectors.keySet());
|
||||
all.addAll(addAdapters.keySet());
|
||||
// all.addAll(allSelectors.keySet());
|
||||
all.addAll(allAdapterLoaders.keySet());
|
||||
return all;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user