Methods Summary |
---|
public int | getCacheIdleTimeoutInSeconds()
return this.cacheIdleTimeoutInSeconds;
|
public int | getMaxCacheSize()
return this.maxCacheSize;
|
public int | getNumberOfVictimsToSelect()
return this.numberOfVictimsToSelect;
|
public int | getRemovalTimeoutInSeconds()
return this.removalTimeoutInSeconds;
|
public java.lang.String | getVictimSelectionPolicy()
return this.victimSelectionPolicy;
|
private void | loadProperties(EjbContainer ejbContainer, com.sun.enterprise.deployment.runtime.BeanCacheDescriptor beanCacheDes)
numberOfVictimsToSelect =
new Integer(ejbContainer.getCacheResizeQuantity()).intValue();
maxCacheSize =
new Integer(ejbContainer.getMaxCacheSize()).intValue();
cacheIdleTimeoutInSeconds = new Integer(
ejbContainer.getCacheIdleTimeoutInSeconds()).intValue();
removalTimeoutInSeconds =
new Integer(ejbContainer.getRemovalTimeoutInSeconds()).intValue();
victimSelectionPolicy = ejbContainer.getVictimSelectionPolicy();
if (beanCacheDes != null) {
int temp = 0;
if ((temp = beanCacheDes.getResizeQuantity()) != -1) {
this.numberOfVictimsToSelect = temp;
}
if ((temp = beanCacheDes.getMaxCacheSize()) != -1) {
this.maxCacheSize = temp;
}
if ((temp = beanCacheDes.getCacheIdleTimeoutInSeconds()) != -1){
this.cacheIdleTimeoutInSeconds = temp;
}
if ((temp = beanCacheDes.getRemovalTimeoutInSeconds()) != -1) {
this.removalTimeoutInSeconds = temp;
}
if (( beanCacheDes.getVictimSelectionPolicy()) != null) {
this.victimSelectionPolicy =
beanCacheDes.getVictimSelectionPolicy();
}
}
|
public java.lang.String | toString()
StringBuffer sbuf = new StringBuffer();
sbuf.append("maxSize: ").append(maxCacheSize)
.append("; victims: ").append(numberOfVictimsToSelect)
.append("; idleTimeout: ").append(cacheIdleTimeoutInSeconds)
.append("; removalTimeout: ").append(removalTimeoutInSeconds)
.append("; policy: ").append(victimSelectionPolicy);
return sbuf.toString();
|