/** * initialize the cache * @param maxEntries maximum number of entries expected in the cache * @param props opaque list of properties for a given cache implementation * @throws a generic Exception if the initialization failed */ public void init(int maxEntries, Properties props) throws Exception { init(maxEntries, DEFAULT_LOAD_FACTOR, props); }
/** * initialize the cache * @param maxEntries maximum number of entries expected in the cache * @param props opaque list of properties for a given cache implementation * @throws a generic Exception if the initialization failed */ public void init(int maxEntries, Properties props) throws Exception { init(maxEntries, DEFAULT_LOAD_FACTOR, props); }
/** * initialize the cache * @param maxEntries maximum number of entries expected in the cache * @param props opaque list of properties for a given cache implementation * @throws a generic Exception if the initialization failed */ public void init(int maxEntries, Properties props) throws Exception { init(maxEntries, DEFAULT_LOAD_FACTOR, props); }
/** * initialize the cache * @param maxEntries maximum number of entries expected in the cache * @param props opaque list of properties for a given cache implementation * @throws a generic Exception if the initialization failed */ public void init(int maxEntries, Properties props) throws Exception { init(maxEntries, DEFAULT_LOAD_FACTOR, props); }
/** * initialize the LRU cache * @param maxCapacity maximum number of entries this cache may hold */ public void init(int maxCapacity, Properties props) throws Exception { super.init(maxCapacity, props); segmentSize = DEFAULT_HASHTABLE_SEGMENT_SIZE; if (props != null) { String prop = props.getProperty("MultiLRUSegmentSize"); if (prop != null) { try { segmentSize = Integer.parseInt(prop); } catch (NumberFormatException nfe) {} } } // create the array of LRU lists int segments = ((maxBuckets / segmentSize) + (((maxBuckets % segmentSize) != 0) ? 1 : 0)); lists = new LruCacheItem[segments][2]; listsLength = new int[lists.length]; for (int i = 0; i < lists.length; i++) { lists[i][LRU_HEAD] = null; lists[i][LRU_TAIL] = null; listsLength[i] = 0; } }
/** * initialize the LRU cache * @param maxCapacity maximum number of entries this cache may hold */ public void init(int maxCapacity, Properties props) throws Exception { super.init(maxCapacity, props); segmentSize = DEFAULT_HASHTABLE_SEGMENT_SIZE; if (props != null) { String prop = props.getProperty("MultiLRUSegmentSize"); if (prop != null) { try { segmentSize = Integer.parseInt(prop); } catch (NumberFormatException nfe) {} } } // create the array of LRU lists int segments = ((maxBuckets / segmentSize) + (((maxBuckets % segmentSize) != 0) ? 1 : 0)); lists = new LruCacheItem[segments][2]; listsLength = new int[lists.length]; for (int i = 0; i < lists.length; i++) { lists[i][LRU_HEAD] = null; lists[i][LRU_TAIL] = null; listsLength[i] = 0; } }
/** * initialize the LRU cache * @param maxCapacity maximum number of entries this cache may hold */ public void init(int maxCapacity, Properties props) throws Exception { super.init(maxCapacity, props); segmentSize = DEFAULT_HASHTABLE_SEGMENT_SIZE; if (props != null) { String prop = props.getProperty("MultiLRUSegmentSize"); if (prop != null) { try { segmentSize = Integer.parseInt(prop); } catch (NumberFormatException nfe) {} } } // create the array of LRU lists int segments = ((maxBuckets / segmentSize) + (((maxBuckets % segmentSize) != 0) ? 1 : 0)); lists = new LruCacheItem[segments][2]; listsLength = new int[lists.length]; for (int i = 0; i < lists.length; i++) { lists[i][LRU_HEAD] = null; lists[i][LRU_TAIL] = null; listsLength[i] = 0; } }
/** * initialize the LRU cache * @param maxCapacity maximum number of entries this cache may hold */ public void init(int maxCapacity, Properties props) throws Exception { super.init(maxCapacity, props); segmentSize = DEFAULT_HASHTABLE_SEGMENT_SIZE; if (props != null) { String prop = props.getProperty("MultiLRUSegmentSize"); if (prop != null) { try { segmentSize = Integer.parseInt(prop); } catch (NumberFormatException nfe) {} } } // create the array of LRU lists int segments = ((maxBuckets / segmentSize) + (((maxBuckets % segmentSize) != 0) ? 1 : 0)); lists = new LruCacheItem[segments][2]; listsLength = new int[lists.length]; for (int i = 0; i < lists.length; i++) { lists[i][LRU_HEAD] = null; lists[i][LRU_TAIL] = null; listsLength[i] = 0; } }
/** * initialize the cache * @param maxEntries maximum number of entries expected in the cache * @param loadFactor the load factor * @param timeout to be used to trim the expired entries * @param props opaque list of properties for a given cache implementation * @throws a generic Exception if the initialization failed */ public void init(int maxEntries, long timeout, float loadFactor, Properties props) { // if the max entries is <= 0 then set the default max entries if (maxEntries <= 0) { maxEntries = defaultMaxEntries; // mark this cache unbounded isUnbounded = true; } setTimeout(timeout); super.init(maxEntries, loadFactor, props); }
/** * initialize the cache * @param maxEntries maximum number of entries expected in the cache * @param loadFactor the load factor * @param timeout to be used to trim the expired entries * @param props opaque list of properties for a given cache implementation * @throws a generic Exception if the initialization failed */ public void init(int maxEntries, long timeout, float loadFactor, Properties props) { // if the max entries is <= 0 then set the default max entries if (maxEntries <= 0) { maxEntries = defaultMaxEntries; // mark this cache unbounded isUnbounded = true; } setTimeout(timeout); super.init(maxEntries, loadFactor, props); }
/** * initialize the cache * @param maxEntries maximum number of entries expected in the cache * @param loadFactor the load factor * @param timeout to be used to trim the expired entries * @param props opaque list of properties for a given cache implementation * @throws a generic Exception if the initialization failed */ public void init(int maxEntries, long timeout, float loadFactor, Properties props) { // if the max entries is <= 0 then set the default max entries if (maxEntries <= 0) { maxEntries = defaultMaxEntries; // mark this cache unbounded isUnbounded = true; } setTimeout(timeout); super.init(maxEntries, loadFactor, props); }
/** * initialize the cache * @param maxEntries maximum number of entries expected in the cache * @param loadFactor the load factor * @param timeout to be used to trim the expired entries * @param props opaque list of properties for a given cache implementation * @throws a generic Exception if the initialization failed */ public void init(int maxEntries, long timeout, float loadFactor, Properties props) { // if the max entries is <= 0 then set the default max entries if (maxEntries <= 0) { maxEntries = defaultMaxEntries; // mark this cache unbounded isUnbounded = true; } setTimeout(timeout); super.init(maxEntries, loadFactor, props); }
((BaseCache)resourceTable).init(maxEntries, loadFactor, null);