add readBufferSize option to memcached client config

This commit is contained in:
Xavier Léauté 2014-03-11 10:37:23 -07:00
parent 8baac724c3
commit 44f9b9cec9
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;
}
}