Package org.apache.hc.core5.benchmark
Class BenchmarkWorker
- java.lang.Object
-
- org.apache.hc.core5.benchmark.BenchmarkWorker
-
- All Implemented Interfaces:
ResourceHolder
class BenchmarkWorker extends java.lang.Object implements ResourceHolder
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.CountDownLatch
completionLatch
private BenchmarkConfig
config
private HttpCoreContext
context
private java.util.concurrent.atomic.AtomicReference<AsyncClientEndpoint>
endpointRef
private HttpHost
host
private java.util.concurrent.atomic.AtomicLong
requestCount
private HttpAsyncRequester
requester
private Stats
stats
-
Constructor Summary
Constructors Constructor Description BenchmarkWorker(HttpAsyncRequester requester, HttpHost host, HttpCoreContext context, java.util.concurrent.atomic.AtomicLong requestCount, java.util.concurrent.CountDownLatch completionLatch, Stats stats, BenchmarkConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private AsyncRequestProducer
createRequestProducer()
private AsyncResponseConsumer<java.lang.Void>
createResponseConsumer()
void
execute()
void
releaseResources()
-
-
-
Field Detail
-
requester
private final HttpAsyncRequester requester
-
host
private final HttpHost host
-
context
private final HttpCoreContext context
-
requestCount
private final java.util.concurrent.atomic.AtomicLong requestCount
-
completionLatch
private final java.util.concurrent.CountDownLatch completionLatch
-
stats
private final Stats stats
-
config
private final BenchmarkConfig config
-
endpointRef
private final java.util.concurrent.atomic.AtomicReference<AsyncClientEndpoint> endpointRef
-
-
Constructor Detail
-
BenchmarkWorker
public BenchmarkWorker(HttpAsyncRequester requester, HttpHost host, HttpCoreContext context, java.util.concurrent.atomic.AtomicLong requestCount, java.util.concurrent.CountDownLatch completionLatch, Stats stats, BenchmarkConfig config)
-
-
Method Detail
-
createRequestProducer
private AsyncRequestProducer createRequestProducer()
-
createResponseConsumer
private AsyncResponseConsumer<java.lang.Void> createResponseConsumer()
-
execute
public void execute()
-
releaseResources
public void releaseResources()
- Specified by:
releaseResources
in interfaceResourceHolder
-
-