1 23 24 package com.sun.ejb.containers.util.cache; 25 26 public class PassivatedSessionCache 27 extends LruCache 28 { 29 30 33 public PassivatedSessionCache() { 34 super(); 35 } 36 37 40 public PassivatedSessionCache(long timeout) { 41 super(timeout); 42 } 43 44 51 protected CacheItem itemAdded(CacheItem item) { 52 CacheItem overflow = null; 53 LruCacheItem lc = (LruCacheItem) item; 54 55 lc.lastAccessed = ((Long ) item.value).longValue(); 57 58 synchronized (this) { 60 if (head != null) { 61 head.lPrev = lc; 62 lc.lNext = head; 63 } 64 else { 65 tail = lc; 66 } 67 head = lc; 68 69 listSize++; 70 71 } 72 73 return overflow; 74 } 75 76 protected boolean isThresholdReached() { 77 return false; 78 } 79 80 } 81 82 | Popular Tags |