mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
review comment fix
This commit is contained in:
parent
9a6a881ceb
commit
1a61846ea0
@ -2,13 +2,13 @@ package io.nosqlbench.engine.api.activityimpl.uniform;
|
||||
|
||||
/*
|
||||
* Copyright (c) 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
|
||||
@ -42,14 +42,11 @@ public class AdapterResolver
|
||||
NBConfiguration configSuperset
|
||||
)
|
||||
{
|
||||
ServiceSelector<DriverAdapterLoader>
|
||||
loader =
|
||||
ServiceSelector.of(name, ServiceLoader.load(DriverAdapterLoader.class));
|
||||
DriverAdapterLoader
|
||||
dal =
|
||||
loader.get()
|
||||
.orElseThrow(() -> new OpConfigError("No DriverAdapterLoader found for " + name));
|
||||
DriverAdapter<CycleOp<?>, Space> adapter = dal.load(parent, NBLabels.forKV());
|
||||
ServiceSelector<DriverAdapterLoader> selector = ServiceSelector.of(
|
||||
name, ServiceLoader.load(DriverAdapterLoader.class));
|
||||
DriverAdapterLoader loader = selector.get()
|
||||
.orElseThrow(() -> new OpConfigError("No DriverAdapterLoader found for " + name));
|
||||
DriverAdapter<CycleOp<?>, Space> adapter = loader.load(parent, NBLabels.forKV());
|
||||
|
||||
if (adapter instanceof NBConfigurable configurable) {
|
||||
NBConfigModel adapterModel = configurable.getConfigModel();
|
||||
|
Loading…
Reference in New Issue
Block a user