protected int getLiveStoreCalculatedIndex(int index) { int calcIndex = index - (getCacheSize() / 2) + getVisibleRowCount(); calcIndex = Math.min(totalCount - getCacheSize(), calcIndex); calcIndex = Math.min(index, calcIndex); return Math.max(0, calcIndex); }
protected boolean shouldCache(int index) { int cz = getCacheSize(); int i = (int) (cz * prefetchFactor); double low = liveStoreOffset + i; double high = liveStoreOffset + cz - getVisibleRowCount() - i; if ((index < low && liveStoreOffset > 0) || (index > high && liveStoreOffset != totalCount - cz)) { return true; } return false; }
protected void doLoad() { loader.load(loaderOffset, getCacheSize()); }
protected boolean isCached(int index) { if ((liveStore.getCount() == 0 && totalCount > 0) || (index < liveStoreOffset) || (index > (liveStoreOffset + getCacheSize() - getVisibleRowCount()))) { return false; } return true; }