public static final class DynamicResourcePool.Options extends Object
Modifier and Type | Method and Description |
---|---|
static DynamicResourcePool.Options |
defaultOptions() |
ScheduledExecutorService |
getGcExecutor() |
long |
getGcIntervalMs() |
long |
getInitialDelayMs() |
int |
getMaxCapacity() |
int |
getMinCapacity() |
DynamicResourcePool.SelectionPolicy |
getSelectionPolicy() |
DynamicResourcePool.Options |
setGcExecutor(ScheduledExecutorService gcExecutor) |
DynamicResourcePool.Options |
setGcIntervalMs(long gcIntervalMs) |
DynamicResourcePool.Options |
setInitialDelayMs(long initialDelayMs) |
DynamicResourcePool.Options |
setMaxCapacity(int maxCapacity) |
DynamicResourcePool.Options |
setMinCapacity(int minCapacity) |
DynamicResourcePool.Options |
setSelectionPolicy(DynamicResourcePool.SelectionPolicy policy) |
public int getMaxCapacity()
public int getMinCapacity()
public long getInitialDelayMs()
public long getGcIntervalMs()
public ScheduledExecutorService getGcExecutor()
public DynamicResourcePool.SelectionPolicy getSelectionPolicy()
public DynamicResourcePool.Options setSelectionPolicy(DynamicResourcePool.SelectionPolicy policy)
policy
- how to select a client from the poolpublic DynamicResourcePool.Options setMaxCapacity(int maxCapacity)
maxCapacity
- the max capacitypublic DynamicResourcePool.Options setMinCapacity(int minCapacity)
minCapacity
- the min capacitypublic DynamicResourcePool.Options setInitialDelayMs(long initialDelayMs)
initialDelayMs
- the initial delaypublic DynamicResourcePool.Options setGcIntervalMs(long gcIntervalMs)
gcIntervalMs
- the gc intervalpublic DynamicResourcePool.Options setGcExecutor(ScheduledExecutorService gcExecutor)
gcExecutor
- the gc executorpublic static DynamicResourcePool.Options defaultOptions()
Copyright © 2023. All Rights Reserved.