mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
inject adapter context into spaces
This commit is contained in:
@@ -132,7 +132,7 @@ public abstract class BaseDriverAdapter<R extends Op, S extends Space> extends N
|
||||
@Override
|
||||
public final synchronized ConcurrentSpaceCache<S> getSpaceCache() {
|
||||
if (spaceCache == null) {
|
||||
spaceCache = new ConcurrentSpaceCache<S>(getSpaceInitializer(getConfiguration()));
|
||||
spaceCache = new ConcurrentSpaceCache<S>(this,getSpaceInitializer(getConfiguration()));
|
||||
}
|
||||
return spaceCache;
|
||||
}
|
||||
|
||||
@@ -21,12 +21,14 @@ package io.nosqlbench.adapters.api.activityimpl.uniform;
|
||||
import java.util.function.IntFunction;
|
||||
import java.util.function.LongFunction;
|
||||
|
||||
public class BaseSpace implements Space {
|
||||
public class BaseSpace<SelfT extends BaseSpace<SelfT> > implements Space {
|
||||
|
||||
private final String spaceName;
|
||||
private final DriverAdapter<?, SelfT> adapter;
|
||||
|
||||
public BaseSpace(long idx) {
|
||||
public BaseSpace(DriverAdapter<?,SelfT> adapter, long idx) {
|
||||
this.spaceName = String.valueOf(idx);
|
||||
this.adapter = adapter;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user