mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
many-sessions improvements, type fixes, more javadocs (#2094)
* some javadoc and type alignment improvements * some javadoc and type alignment improvements * example adapter * alignment to previous changes * improvements to many session testing * add missing annotation
This commit is contained in:
@@ -27,7 +27,7 @@ public class TcpClientOpDispenser extends BaseOpDispenser<TcpClientOp, TcpClient
|
||||
private final LongFunction<String> outFunction;
|
||||
|
||||
public TcpClientOpDispenser(TcpClientDriverAdapter adapter, ParsedOp cmd, LongFunction<TcpClientAdapterSpace> ctxfunc) {
|
||||
super(adapter,cmd);
|
||||
super(adapter,cmd, adapter.getSpaceFunc(cmd));
|
||||
this.ctxFunction = ctxfunc;
|
||||
LongFunction<Object> objectFunction = cmd.getAsRequiredFunction("stmt", Object.class);
|
||||
LongFunction<String> stringFunction = l -> objectFunction.apply(l).toString();
|
||||
@@ -35,9 +35,9 @@ public class TcpClientOpDispenser extends BaseOpDispenser<TcpClientOp, TcpClient
|
||||
}
|
||||
|
||||
@Override
|
||||
public TcpClientOp getOp(long value) {
|
||||
TcpClientAdapterSpace ctx = ctxFunction.apply(value);
|
||||
String output = outFunction.apply(value);
|
||||
public TcpClientOp getOp(long cycle) {
|
||||
TcpClientAdapterSpace ctx = ctxFunction.apply(cycle);
|
||||
String output = outFunction.apply(cycle);
|
||||
return new TcpClientOp(ctx,output);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,9 +18,8 @@ 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.ConcurrentSpaceCache;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.Space;
|
||||
import io.nosqlbench.adapters.api.templating.ParsedOp;
|
||||
import io.nosqlbench.nb.api.components.core.NBComponent;
|
||||
|
||||
import java.util.function.LongFunction;
|
||||
|
||||
@@ -34,7 +33,7 @@ public class TcpClientOpMapper implements OpMapper<TcpClientOp,TcpClientAdapterS
|
||||
}
|
||||
|
||||
@Override
|
||||
public OpDispenser<TcpClientOp> apply(ParsedOp op, LongFunction<TcpClientAdapterSpace> spaceInitF) {
|
||||
public OpDispenser<TcpClientOp> apply(NBComponent adapterC, ParsedOp op, LongFunction<TcpClientAdapterSpace> spaceInitF) {
|
||||
LongFunction<String> spacefunc = op.getAsFunctionOr("space", "default");
|
||||
LongFunction<TcpClientAdapterSpace> ctxfunc = adapter.getSpaceFunc(op);
|
||||
return new TcpClientOpDispenser(adapter,op,ctxfunc);
|
||||
|
||||
@@ -27,7 +27,7 @@ public class TcpServerOpDispenser extends BaseOpDispenser<TcpServerOp,TcpServerA
|
||||
private final LongFunction<String> outFunction;
|
||||
|
||||
public TcpServerOpDispenser(TcpServerDriverAdapter adapter, ParsedOp cmd, LongFunction<TcpServerAdapterSpace> ctxfunc) {
|
||||
super(adapter,cmd);
|
||||
super(adapter,cmd, ctxfunc);
|
||||
this.ctxFunction = ctxfunc;
|
||||
LongFunction<Object> objectFunction = cmd.getAsRequiredFunction("stmt", Object.class);
|
||||
LongFunction<String> stringFunction = l -> objectFunction.apply(l).toString();
|
||||
@@ -35,9 +35,9 @@ public class TcpServerOpDispenser extends BaseOpDispenser<TcpServerOp,TcpServerA
|
||||
}
|
||||
|
||||
@Override
|
||||
public TcpServerOp getOp(long value) {
|
||||
TcpServerAdapterSpace ctx = ctxFunction.apply(value);
|
||||
String output = outFunction.apply(value);
|
||||
public TcpServerOp getOp(long cycle) {
|
||||
TcpServerAdapterSpace ctx = ctxFunction.apply(cycle);
|
||||
String output = outFunction.apply(cycle);
|
||||
return new TcpServerOp(ctx,output);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,9 +18,8 @@ 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.ConcurrentSpaceCache;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.Space;
|
||||
import io.nosqlbench.adapters.api.templating.ParsedOp;
|
||||
import io.nosqlbench.nb.api.components.core.NBComponent;
|
||||
|
||||
import java.util.function.LongFunction;
|
||||
|
||||
@@ -34,7 +33,7 @@ public class TcpServerOpMapper implements OpMapper<TcpServerOp,TcpServerAdapterS
|
||||
}
|
||||
|
||||
@Override
|
||||
public OpDispenser<TcpServerOp> apply(ParsedOp op, LongFunction<TcpServerAdapterSpace> spaceInitF) {
|
||||
public OpDispenser<TcpServerOp> apply(NBComponent adapterC, ParsedOp op, LongFunction<TcpServerAdapterSpace> spaceInitF) {
|
||||
LongFunction<String> spacefunc = op.getAsFunctionOr("space", "default");
|
||||
LongFunction<TcpServerAdapterSpace> ctxfunc = adapter.getSpaceFunc(op);
|
||||
return new TcpServerOpDispenser(adapter,op,ctxfunc);
|
||||
|
||||
Reference in New Issue
Block a user