/** * All entries for the LRUCapacityController are * considered to be of size 1. */ public int entrySize( Object key, Object value ) throws IllegalArgumentException { if (Token.isRemoved(value) /*&& (value != Token.TOMBSTONE)*/) { // un-comment to make tombstones visible // bug #42228 - lruEntryDestroy removes an entry from the LRU, but if // it is subsequently resurrected we want the new entry to generate a delta return 0; } if ((value == null /* overflow to disk */ || value == Token.INVALID || value == Token.LOCAL_INVALID) && getEvictionAction().isOverflowToDisk()) { // Don't count this guys toward LRU return 0; } else { return 1; } }
/** * All entries for the LRUCapacityController are * considered to be of size 1. */ public int entrySize( Object key, Object value ) throws IllegalArgumentException { if (Token.isRemoved(value) /*&& (value != Token.TOMBSTONE)*/) { // un-comment to make tombstones visible // bug #42228 - lruEntryDestroy removes an entry from the LRU, but if // it is subsequently resurrected we want the new entry to generate a delta return 0; } if ((value == null /* overflow to disk */ || value == Token.INVALID || value == Token.LOCAL_INVALID) && getEvictionAction().isOverflowToDisk()) { // Don't count this guys toward LRU return 0; } else { return 1; } }