Class OrderedExecutor.AbstractBuilder<T extends OrderedExecutor>
- java.lang.Object
-
- org.apache.bookkeeper.common.util.OrderedExecutor.AbstractBuilder<T>
-
- Direct Known Subclasses:
OrderedExecutor.Builder
,OrderedScheduler.SchedulerBuilder
- Enclosing class:
- OrderedExecutor
public abstract static class OrderedExecutor.AbstractBuilder<T extends OrderedExecutor> extends java.lang.Object
Abstract builder class to buildOrderedScheduler
.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
enableBusyWait
protected boolean
enableThreadScopedMetrics
protected int
maxTasksInQueue
protected java.lang.String
name
protected int
numThreads
protected boolean
preserveMdcForTaskExecution
protected StatsLogger
statsLogger
protected java.util.concurrent.ThreadFactory
threadFactory
protected boolean
traceTaskExecution
protected long
warnTimeMicroSec
-
Constructor Summary
Constructors Constructor Description AbstractBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
build()
OrderedExecutor.AbstractBuilder<T>
enableBusyWait(boolean enableBusyWait)
OrderedExecutor.AbstractBuilder<T>
enableThreadScopedMetrics(boolean enableThreadScopedMetrics)
OrderedExecutor.AbstractBuilder<T>
maxTasksInQueue(int num)
OrderedExecutor.AbstractBuilder<T>
name(java.lang.String name)
OrderedExecutor.AbstractBuilder<T>
numThreads(int num)
OrderedExecutor.AbstractBuilder<T>
preserveMdcForTaskExecution(boolean enabled)
OrderedExecutor.AbstractBuilder<T>
statsLogger(StatsLogger statsLogger)
OrderedExecutor.AbstractBuilder<T>
threadFactory(java.util.concurrent.ThreadFactory threadFactory)
OrderedExecutor.AbstractBuilder<T>
traceTaskExecution(boolean enabled)
OrderedExecutor.AbstractBuilder<T>
traceTaskWarnTimeMicroSec(long warnTimeMicroSec)
-
-
-
Field Detail
-
name
protected java.lang.String name
-
numThreads
protected int numThreads
-
threadFactory
protected java.util.concurrent.ThreadFactory threadFactory
-
statsLogger
protected StatsLogger statsLogger
-
traceTaskExecution
protected boolean traceTaskExecution
-
preserveMdcForTaskExecution
protected boolean preserveMdcForTaskExecution
-
warnTimeMicroSec
protected long warnTimeMicroSec
-
maxTasksInQueue
protected int maxTasksInQueue
-
enableBusyWait
protected boolean enableBusyWait
-
enableThreadScopedMetrics
protected boolean enableThreadScopedMetrics
-
-
Method Detail
-
name
public OrderedExecutor.AbstractBuilder<T> name(java.lang.String name)
-
numThreads
public OrderedExecutor.AbstractBuilder<T> numThreads(int num)
-
maxTasksInQueue
public OrderedExecutor.AbstractBuilder<T> maxTasksInQueue(int num)
-
threadFactory
public OrderedExecutor.AbstractBuilder<T> threadFactory(java.util.concurrent.ThreadFactory threadFactory)
-
statsLogger
public OrderedExecutor.AbstractBuilder<T> statsLogger(StatsLogger statsLogger)
-
traceTaskExecution
public OrderedExecutor.AbstractBuilder<T> traceTaskExecution(boolean enabled)
-
preserveMdcForTaskExecution
public OrderedExecutor.AbstractBuilder<T> preserveMdcForTaskExecution(boolean enabled)
-
traceTaskWarnTimeMicroSec
public OrderedExecutor.AbstractBuilder<T> traceTaskWarnTimeMicroSec(long warnTimeMicroSec)
-
enableBusyWait
public OrderedExecutor.AbstractBuilder<T> enableBusyWait(boolean enableBusyWait)
-
enableThreadScopedMetrics
public OrderedExecutor.AbstractBuilder<T> enableThreadScopedMetrics(boolean enableThreadScopedMetrics)
-
build
public T build()
-
-