Merge pull request #427 from metamx/allow-disabling-opqueue

add readBufferSize option to memcached client config
This commit is contained in:
fjy 2014-03-11 11:39:18 -06:00
commit 9033472fe7
2 changed files with 11 additions and 1 deletions

View File

@ -78,6 +78,7 @@ public class MemcachedCache implements Cache
.setShouldOptimize(true)
.setOpQueueMaxBlockTime(config.getTimeout())
.setOpTimeout(config.getTimeout())
.setReadBufferSize(config.getReadBufferSize())
.setOpQueueFactory(opQueueFactory)
.build(),
AddrUtil.getAddresses(config.getHosts())

View File

@ -41,10 +41,14 @@ public class MemcachedCacheConfig
@JsonProperty
private int maxObjectSize = 50 * 1024 * 1024;
// memcached client read buffer size, -1 uses the spymemcached library default
@JsonProperty
private int readBufferSize = -1;
@JsonProperty
private String memcachedPrefix = "druid";
// maximum size in bytes of memcached client operation queue. 0 means unlimited
// maximum size in bytes of memcached client operation queue. 0 means unbounded
@JsonProperty
private long maxOperationQueueSize = 0;
@ -77,4 +81,9 @@ public class MemcachedCacheConfig
{
return maxOperationQueueSize;
}
public int getReadBufferSize()
{
return readBufferSize;
}
}