private static Weigher<IRowCacheEntry> createMemoryWeigher()
{
return new Weigher<IRowCacheEntry>()
{
final MemoryMeter meter = new MemoryMeter();
public int weightOf(IRowCacheEntry value)
{
return (int) Math.min(meter.measureDeep(value), Integer.MAX_VALUE);
}
};
}