long time = System.currentTimeMillis();
CountStatistic cs = null;
cs = new CountStatisticImpl(0,
getLocalizedStringFor("num.conn.failed.validation",
"NumConnFailedValidation"),
getLocalizedStringFor("stat.count", "Count"),
getLocalizedStringFor("num.conn.failed.validation.desc",
"Number Of Connections that failed validation"),
time, time);
numConnFailedValidation_ = new MutableCountStatisticImpl( cs );
cs = new CountStatisticImpl(0,
getLocalizedStringFor("num.conn.timedout", "NumConnTimedOut"),
getLocalizedStringFor("stat.count", "Count"),
getLocalizedStringFor("num.conn.timedout.desc",
"Number of Connection requests that timed out waiting"),
time, time);
numConnTimedOut_ = new MutableCountStatisticImpl( cs );
cs = new CountStatisticImpl(0,
getLocalizedStringFor("num.conn.created","NumConnCreated"),
getLocalizedStringFor("stat.count", "Count"),
getLocalizedStringFor("num.conn.created.desc",
"Number of Connection that have been created"),
time, time);
numConnCreated = new MutableCountStatisticImpl( cs );
cs = new CountStatisticImpl(0,
getLocalizedStringFor("num.conn.destroyed",
"NumConnDestroyed"),
getLocalizedStringFor("stat.count", "Count"),
getLocalizedStringFor("num.conn.destroyed.desc",
"Number of Connection that have been destroyed") ,
time, time);
numConnDestroyed = new MutableCountStatisticImpl( cs );
cs = new CountStatisticImpl(0,
getLocalizedStringFor("num.conn.opened", "NumConnOpened"),
getLocalizedStringFor("stat.count", "Count"),
getLocalizedStringFor("num.conn.opened.desc",
"Number of Connection that have been acquired"),
time, time);
numConnAcquired = new MutableCountStatisticImpl( cs );
cs = new CountStatisticImpl(0,
getLocalizedStringFor("num.conn.closed", "NumConnClosed"),
getLocalizedStringFor("stat.count", "Count"),
getLocalizedStringFor("num.conn.closed.desc",
"Number of Connection that have been released"),
time, time);
numConnReleased = new MutableCountStatisticImpl( cs );
cs = new CountStatisticImpl(0,
getLocalizedStringFor("avg.conn.wait.time",
"AvgConnWaitTime"),
getLocalizedStringFor("stat.milliseconds", "milliseconds"),
getLocalizedStringFor("avg.conn.wait.time.desc",
"Average wait time-duration per successful connection request"),
time, time);
averageConnWaitTime = new MutableCountStatisticImpl( cs );
cs = new CountStatisticImpl(0,
getLocalizedStringFor("wait.queue.length",
"WaitQueueLength"),
getLocalizedStringFor("stat.count", "Count"),
getLocalizedStringFor("wait.queue.length.desc",
"Connection request Wait Queue length"),
time, time);
waitQueueLength = new MutableCountStatisticImpl( cs );
//the low water mark is set with a seed value of 1 to
//ensure that the comparison with currentVal returns
//the correct low water mark the first time around
//the least number of connections that we can use is always 1
numConnUsed_ = new RangeStatisticImpl(0, 0, 1,
getLocalizedStringFor("num.conn.used", "NumConnUsed"),
getLocalizedStringFor("stat.count", "Count"),
getLocalizedStringFor("num.conn.used.desc",
"Number Of Connections used"),
time, time);
numConnFree_ = new RangeStatisticImpl(0, 0, 1,
getLocalizedStringFor("num.conn.free", "NumConnFree"),
getLocalizedStringFor("stat.count", "Count"),
getLocalizedStringFor("num.conn.free.desc",
"Number Of Free Connections"),
time, time);
numConnRequestWaitTime_ = new RangeStatisticImpl(0, 0, 1,
getLocalizedStringFor("conn.request.wait.time",
"ConnRequestWaitTime"),
getLocalizedStringFor("stat.milliseconds", "milliseconds"),
getLocalizedStringFor("conn.request.wait.time.desc",
"Max and min connection request wait times"),
time, time);
cs = new CountStatisticImpl(0,
getLocalizedStringFor("num.conn.matched", "NumConnMatched"),
getLocalizedStringFor("stat.count", "Count"),
getLocalizedStringFor("num.conn.matched.desc",
"Number of Connection that were successfully matched by the MCF. "),
time, time);
numConnMatched = new MutableCountStatisticImpl( cs );
cs = new CountStatisticImpl(0,
getLocalizedStringFor("num.conn.not.matched", "NumConnNotMatched"),
getLocalizedStringFor("stat.count", "Count"),
getLocalizedStringFor("num.conn.not.matched.desc",
"Number of Connection that were rejected by the MCF. "),
time, time);
numConnNotMatched = new MutableCountStatisticImpl( cs );
cs = new CountStatisticImpl(0,
getLocalizedStringFor("num.potential.connection.leak", "NumPotentialConnLeak"),
getLocalizedStringFor("stat.count", "Count"),
getLocalizedStringFor("num.potential.connection.leak.desc",
"Number of potential connections leak detected."),
time, time);
numPotentialConnLeak = new MutableCountStatisticImpl( cs );