Rename "io.netty.recycler.maxCapacity.default" to "io.netty.recycler.maxCapacity"

Motivation:

'io.netty.recycler.maxCapacity.default' is the only property for recycler's default maximum capacity, so having the 'default' suffix only increases the length of the property name.

Modifications:

Rename "io.netty.recycler.maxCapacity.default" to "io.netty.recycler.maxCapacity"

Result:

Shorter system property name. The future addition of system properties, such as io.netty.recycler.maxCapacity.outboundBuffer, are not confusing either.
This commit is contained in:
Trustin Lee 2014-03-18 16:25:32 +09:00
parent 9856563144
commit 9fe9710315

View File

@ -39,7 +39,7 @@ public abstract class Recycler<T> {
// In the future, we might have different maxCapacity for different object types. // In the future, we might have different maxCapacity for different object types.
// e.g. io.netty.recycler.maxCapacity.writeTask // e.g. io.netty.recycler.maxCapacity.writeTask
// io.netty.recycler.maxCapacity.outboundBuffer // io.netty.recycler.maxCapacity.outboundBuffer
int maxCapacity = SystemPropertyUtil.getInt("io.netty.recycler.maxCapacity.default", 0); int maxCapacity = SystemPropertyUtil.getInt("io.netty.recycler.maxCapacity", 0);
if (maxCapacity <= 0) { if (maxCapacity <= 0) {
// TODO: Some arbitrary large number - should adjust as we get more production experience. // TODO: Some arbitrary large number - should adjust as we get more production experience.
maxCapacity = 262144; maxCapacity = 262144;
@ -47,7 +47,7 @@ public abstract class Recycler<T> {
DEFAULT_MAX_CAPACITY = maxCapacity; DEFAULT_MAX_CAPACITY = maxCapacity;
if (logger.isDebugEnabled()) { if (logger.isDebugEnabled()) {
logger.debug("-Dio.netty.recycler.maxCapacity.default: {}", DEFAULT_MAX_CAPACITY); logger.debug("-Dio.netty.recycler.maxCapacity: {}", DEFAULT_MAX_CAPACITY);
} }
INITIAL_CAPACITY = Math.min(DEFAULT_MAX_CAPACITY, 256); INITIAL_CAPACITY = Math.min(DEFAULT_MAX_CAPACITY, 256);