intern strings

This commit is contained in:
zzz
2012-09-19 20:47:50 +00:00
parent f232775161
commit 0eedc3aa19
2 changed files with 4 additions and 4 deletions

View File

@@ -82,8 +82,8 @@ public class CoDelBlockingQueue<E extends CDQEntry> extends LinkedBlockingQueue<
_log = ctx.logManager().getLog(CoDelBlockingQueue.class);
_name = name;
_capacity = capacity;
STAT_DROP = "codel." + name + ".drop";
STAT_DELAY = "codel." + name + ".delay";
STAT_DROP = ("codel." + name + ".drop").intern();
STAT_DELAY = ("codel." + name + ".delay").intern();
ctx.statManager().createRequiredRateStat(STAT_DROP, "queue delay of dropped items", "Router", RATES);
ctx.statManager().createRequiredRateStat(STAT_DELAY, "average queue delay", "Router", RATES);
_id = __id.incrementAndGet();

View File

@@ -90,8 +90,8 @@ public class CoDelPriorityBlockingQueue<E extends CDPQEntry> extends PriBlocking
_context = ctx;
_log = ctx.logManager().getLog(CoDelPriorityBlockingQueue.class);
_name = name;
STAT_DROP = "codel." + name + ".drop.";
STAT_DELAY = "codel." + name + ".delay";
STAT_DROP = ("codel." + name + ".drop.").intern();
STAT_DELAY = ("codel." + name + ".delay").intern();
for (int i = 0; i < PRIORITIES.length; i++) {
ctx.statManager().createRequiredRateStat(STAT_DROP + PRIORITIES[i], "queue delay of dropped items by priority", "Router", RATES);
}