|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvoldemort.utils.pool.ResourcePoolConfig
public class ResourcePoolConfig
Resource pool config class.
Constructor Summary | |
---|---|
ResourcePoolConfig()
|
Method Summary | |
---|---|
int |
getMaximumInvalidResourceCreationLimit()
Get the maximum number of invalid resources that can be created before throwing an exception. |
int |
getMaxPoolSize()
Get the size of the pool |
long |
getTimeout(java.util.concurrent.TimeUnit unit)
Get the the pool timeout in the given units |
boolean |
isFair()
Controls whether the pool gives resources to threads in the order they arrive or not |
ResourcePoolConfig |
setIsFair(boolean isFair)
Controls whether the pool gives resources to threads in the order they arrive or not. |
ResourcePoolConfig |
setMaxInvalidAttempts(int limit)
The maximum number of successive invalid resources that can be created in a single checkout. |
ResourcePoolConfig |
setMaxPoolSize(int poolSize)
The size of the pool to maintain for each key. |
ResourcePoolConfig |
setTimeout(long timeout,
java.util.concurrent.TimeUnit unit)
The timeout which we block for when a resource is not available |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResourcePoolConfig()
Method Detail |
---|
public int getMaxPoolSize()
public ResourcePoolConfig setMaxPoolSize(int poolSize)
poolSize
- The desired per-key pool sizepublic long getTimeout(java.util.concurrent.TimeUnit unit)
unit
- The units in which to fetch the timeout
public ResourcePoolConfig setTimeout(long timeout, java.util.concurrent.TimeUnit unit)
timeout
- The timeoutunit
- The units of the timeoutpublic ResourcePoolConfig setMaxInvalidAttempts(int limit)
limit
- The desired limitpublic int getMaximumInvalidResourceCreationLimit()
public boolean isFair()
public ResourcePoolConfig setIsFair(boolean isFair)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |