Fields Summary |
---|
private com.sun.ejb.spi.stats.MonitorableSFSBStoreManager | provider |
private com.sun.enterprise.admin.monitor.stats.MutableBoundedRangeStatisticImpl | currentSize |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatisticImpl | activationCount |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatisticImpl | activationSuccessCount |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatisticImpl | activationErrorCount |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatisticImpl | passivationCount |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatisticImpl | passivationSuccessCount |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatisticImpl | passivationErrorCount |
private com.sun.enterprise.admin.monitor.stats.MutableCountStatisticImpl | expiredSessionCount |
private com.sun.enterprise.admin.monitor.stats.MutableAverageRangeStatisticImpl | activationSize |
private com.sun.enterprise.admin.monitor.stats.MutableAverageRangeStatisticImpl | activationTime |
private com.sun.enterprise.admin.monitor.stats.MutableAverageRangeStatisticImpl | passivationSize |
private com.sun.enterprise.admin.monitor.stats.MutableAverageRangeStatisticImpl | passivationTime |
private Object | currentSizeLock |
private Object | activationCountLock |
private Object | activationSizeLock |
private Object | activationTimeLock |
private Object | passivationCountLock |
private Object | passivationSizeLock |
private Object | passivationTimeLock |
private Object | expiredSessionCountLock |
private long | activationCountVal |
private long | activationSuccessCountVal |
private long | activationErrorCountVal |
private long | passivationCountVal |
private long | passivationSuccessCountVal |
private long | passivationErrorCountVal |
private long | expiredSessionCountVal |
Methods Summary |
---|
protected void | appendStats(java.lang.StringBuffer sbuf)
sbuf.append("currentSize=").append(provider.getCurrentStoreSize())
.append("; ")
.append("ActivationCount=").append(activationCountVal)
.append("; ")
.append("ActivationSuccessCount=").append(activationSuccessCountVal)
.append("; ")
.append("ActivationErrorCount=").append(activationErrorCountVal)
.append("; ")
.append("PassivationCount=").append(passivationCountVal)
.append("; ")
.append("PassivationSuccessCount=").append(passivationSuccessCountVal)
.append("; ")
.append("PassivationErrorCount=").append(passivationErrorCountVal)
.append("; ")
.append("ExpiredSessionsRemoved=").append(expiredSessionCountVal)
.append("; ");
appendTimeStatistic(sbuf, "ActivationSize", activationSize);
appendTimeStatistic(sbuf, "ActivationTime", activationTime);
appendTimeStatistic(sbuf, "PassivationSize", passivationSize);
appendTimeStatistic(sbuf, "PassivationTime", passivationTime);
//Do not call provider.appendStats(). It is called from
// MonitoringRegistryMediator so that all undocumented
// features are grouped together
|
protected static void | appendTimeStatistic(java.lang.StringBuffer sbuf, java.lang.String name, com.sun.enterprise.admin.monitor.stats.MutableAverageRangeStatisticImpl stat)
sbuf.append(name).append("(")
.append("min=").append(stat.getLowWaterMark()).append(", ")
.append("max=").append(stat.getHighWaterMark()).append(", ")
.append("avg=").append(stat.getAverage())
.append("); ");
|
public com.sun.enterprise.admin.monitor.stats.AverageRangeStatistic | getActivatedBeanSize()Returns the total number of bytes activated by this store including total, min, maximum
synchronized (activationSizeLock) {
return (AverageRangeStatistic) activationSize.unmodifiableView();
}
|
public javax.management.j2ee.statistics.CountStatistic | getActivationCount()Returns the total number of sessions activated from the store
synchronized (activationCountLock) {
activationCount.setCount(activationCountVal);
return (CountStatistic) activationCount.unmodifiableView();
}
|
public javax.management.j2ee.statistics.CountStatistic | getActivationErrorCount()Returns the total number of sessions that couldn't be Activated from the store
synchronized (activationCountLock) {
activationErrorCount.setCount(activationErrorCountVal);
return (CountStatistic) activationErrorCount.unmodifiableView();
}
|
public javax.management.j2ee.statistics.CountStatistic | getActivationSuccessCount()Returns the total number of sessions successfully Activated from the store
synchronized (activationCountLock) {
activationSuccessCount.setCount(activationSuccessCountVal);
return (CountStatistic) activationSuccessCount.unmodifiableView();
}
|
public com.sun.enterprise.admin.monitor.stats.AverageRangeStatistic | getActivationTime()Returns the time spent on activating beans from the store including total, min, max
synchronized (activationTimeLock) {
return (AverageRangeStatistic) activationTime.unmodifiableView();
}
|
public javax.management.j2ee.statistics.RangeStatistic | getCurrentSize()Returns the number of passivated / checkpointed sessions in the store
synchronized (currentSizeLock) {
currentSize.setCount(provider.getCurrentStoreSize());
return (RangeStatistic) currentSize.unmodifiableView();
}
|
public javax.management.j2ee.statistics.CountStatistic | getExpiredSessionCount()Returns the total number of expired sessions that were removed by this store
synchronized (expiredSessionCountLock) {
expiredSessionCount.setCount(expiredSessionCountVal);
return (CountStatistic) expiredSessionCount.unmodifiableView();
}
|
int | getNumExpiredSessionCount()
synchronized (expiredSessionCountLock) {
return (int) expiredSessionCountVal;
}
|
int | getNumPassivationCount()
synchronized (passivationCountLock) {
return (int) passivationCountVal;
}
|
int | getNumPassivationErrorCount()
synchronized (passivationCountLock) {
return (int) passivationErrorCountVal;
}
|
int | getNumPassivationSuccessCount()
synchronized (passivationCountLock) {
return (int) passivationSuccessCountVal;
}
|
public com.sun.enterprise.admin.monitor.stats.AverageRangeStatistic | getPassivatedBeanSize()Returns the total number of bytes passivated by this store including total, min, maximum
synchronized (passivationSizeLock) {
return (AverageRangeStatistic) passivationSize.unmodifiableView();
}
|
public javax.management.j2ee.statistics.CountStatistic | getPassivationCount()Returns the total number of sessions passivated using this store
synchronized (passivationCountLock) {
passivationCount.setCount(passivationCountVal);
return (CountStatistic) passivationSuccessCount.unmodifiableView();
}
|
public javax.management.j2ee.statistics.CountStatistic | getPassivationErrorCount()Returns the total number of sessions that couldn't be Passivated using the store
synchronized (passivationCountLock) {
passivationErrorCount.setCount(passivationErrorCountVal);
return (CountStatistic) passivationSuccessCount.unmodifiableView();
}
|
public javax.management.j2ee.statistics.CountStatistic | getPassivationSuccessCount()Returns the total number of sessions successfully Passivated using the store
synchronized (passivationCountLock) {
passivationSuccessCount.setCount(passivationSuccessCountVal);
return (CountStatistic) passivationSuccessCount.unmodifiableView();
}
|
public com.sun.enterprise.admin.monitor.stats.AverageRangeStatistic | getPassivationTime()Returns the time spent on passivating beans to the store including total, min, max
synchronized (passivationTimeLock) {
return (AverageRangeStatistic) passivationTime.unmodifiableView();
}
|
void | incrementActivationCount(boolean success)
synchronized (activationCountLock) {
activationCountVal++;
if (success) {
activationSuccessCountVal++;
} else {
activationErrorCountVal++;
}
}
|
void | incrementExpiredSessionCountVal(long val)
synchronized (expiredSessionCountLock) {
expiredSessionCountVal += val;
}
|
void | incrementPassivationCount(boolean success)
synchronized (passivationCountLock) {
passivationCountVal++;
if (success) {
passivationSuccessCountVal++;
} else {
passivationErrorCountVal++;
}
}
|
protected void | initialize()
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)
);
}
|
void | setActivationSize(long val)
synchronized (activationSizeLock) {
activationSize.setCount(val);
}
|
void | setActivationTime(long val)
synchronized (activationTimeLock) {
activationTime.setCount(val);
}
|
void | setPassivationSize(long val)
synchronized (passivationSizeLock) {
passivationSize.setCount(val);
}
|
void | setPassivationTime(long val)
synchronized (passivationTimeLock) {
passivationTime.setCount(val);
}
|