long now = System.currentTimeMillis();
synchronized (currentSizeLock) {
currentSize = new MutableBoundedRangeStatisticImpl(
new BoundedRangeStatisticImpl(0, 0, Long.MAX_VALUE,
Long.MAX_VALUE, 0, "CurrentSize",
"bytes", "Number of sessions in store", now, now)
);
}
synchronized (activationCountLock) {
activationCount = new MutableCountStatisticImpl(
new CountStatisticImpl("ActivationCount"));
activationSuccessCount = new MutableCountStatisticImpl(
new CountStatisticImpl("ActivationSuccessCount"));
activationErrorCount = new MutableCountStatisticImpl(
new CountStatisticImpl("ActivationErrorCount"));
}
synchronized (activationSizeLock) {
activationSize = new MutableAverageRangeStatisticImpl(
new BoundedRangeStatisticImpl(0, 0, Long.MAX_VALUE,
Long.MAX_VALUE, 0, "ActivationSize",
"bytes", "Number of bytes activated", now, now)
);
}
synchronized (passivationSizeLock) {
passivationSize = new MutableAverageRangeStatisticImpl(
new BoundedRangeStatisticImpl(0, 0, Long.MAX_VALUE,
Long.MAX_VALUE, 0, "PassivationSize",
"bytes", "Number of bytes passivated", now, now)
);
}
synchronized (passivationCountLock) {
passivationCount = new MutableCountStatisticImpl(
new CountStatisticImpl("PassivationCount"));
passivationSuccessCount = new MutableCountStatisticImpl(
new CountStatisticImpl("PassivationSuccessCount"));
passivationErrorCount = new MutableCountStatisticImpl(
new CountStatisticImpl("PassivationErrorCount"));
}
synchronized (expiredSessionCountLock) {
expiredSessionCount = new MutableCountStatisticImpl(
new CountStatisticImpl("ExpiredSessionCount"));
}
synchronized (activationTimeLock) {
activationTime = new MutableAverageRangeStatisticImpl(
new BoundedRangeStatisticImpl(0, 0, Long.MAX_VALUE,
Long.MAX_VALUE, 0, "ActivationTime",
"millis", "Time spent on activation", now, now)
);
}
synchronized (passivationTimeLock) {
passivationTime = new MutableAverageRangeStatisticImpl(
new BoundedRangeStatisticImpl(0, 0, Long.MAX_VALUE,
Long.MAX_VALUE, 0, "PassivationTime",
"millis", "Time spent on passivation", now, now)
);
}
}