public void setExpireTime ( long expireTime ) { // if expire time was <= 0 and is now greater, fill expire table now if ( this . expireTime <= 0 && expireTime > 0 ) { long currentTime = System . currentTimeMillis ( ) ; Iterator values = cacheLineTable . values ( ) . iterator ( ) ; while ( values . hasNext ( ) ) { CacheLine line = ( CacheLine ) values . next ( ) ; line . setLoadTime ( currentTime ) ; } } else if ( this . expireTime <= 0 && expireTime > 0 ) { // if expire time // was > 0 and is // now <=, do // nothing, just // leave the load // times in place, // won't hurt // anything... } this . expireTime = expireTime ; }
Sets the expire time for the cache elements . If 0 elements never expire .