|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.client.data.CacheStrategy.AbstractBasicSymmetricalCacheStrategy
public abstract static class CacheStrategy.AbstractBasicSymmetricalCacheStrategy
A helper class for creating a simple symmetric cache strategy that uses the same logic for both rows before and after the currently cached range.
This simple approach rules out more advanced heuristics that would take the current scrolling direction or past scrolling behavior into account.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.vaadin.client.data.CacheStrategy |
|---|
CacheStrategy.AbstractBasicSymmetricalCacheStrategy, CacheStrategy.DefaultCacheStrategy |
| Constructor Summary | |
|---|---|
CacheStrategy.AbstractBasicSymmetricalCacheStrategy()
|
|
| Method Summary | |
|---|---|
com.vaadin.shared.ui.grid.Range |
getMaxCacheRange(com.vaadin.shared.ui.grid.Range displayedRange,
com.vaadin.shared.ui.grid.Range cachedRange,
com.vaadin.shared.ui.grid.Range estimatedAvailableRange)
Gets the maximum row range that should be cached. |
abstract int |
getMaximumCacheSize(int pageSize)
Gets the maximum number of extra items to cache in one direction. |
com.vaadin.shared.ui.grid.Range |
getMinCacheRange(com.vaadin.shared.ui.grid.Range displayedRange,
com.vaadin.shared.ui.grid.Range cachedRange,
com.vaadin.shared.ui.grid.Range estimatedAvailableRange)
Gets the minimum row range that should be cached. |
abstract int |
getMinimumCacheSize(int pageSize)
Gets the the minimum number of extra items to cache in one direction. |
void |
onDataArrive(double roundTripTime,
int rowCount)
Called whenever data requested by the data source has arrived. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CacheStrategy.AbstractBasicSymmetricalCacheStrategy()
| Method Detail |
|---|
public void onDataArrive(double roundTripTime,
int rowCount)
CacheStrategyA cache strategy implementation cannot use this information to keep track of which items are in the cache since the data source might discard items without notifying the cache strategy.
onDataArrive in interface CacheStrategyroundTripTime - the total number of milliseconds elapsed from requesting the
data until the response was passed to the data sourcerowCount - the number of received rows
public com.vaadin.shared.ui.grid.Range getMinCacheRange(com.vaadin.shared.ui.grid.Range displayedRange,
com.vaadin.shared.ui.grid.Range cachedRange,
com.vaadin.shared.ui.grid.Range estimatedAvailableRange)
CacheStrategy
getMinCacheRange in interface CacheStrategydisplayedRange - the range of currently displayed rowscachedRange - the range of currently cached rowsestimatedAvailableRange - the estimated range of rows available for the data source
public com.vaadin.shared.ui.grid.Range getMaxCacheRange(com.vaadin.shared.ui.grid.Range displayedRange,
com.vaadin.shared.ui.grid.Range cachedRange,
com.vaadin.shared.ui.grid.Range estimatedAvailableRange)
CacheStrategy
getMaxCacheRange in interface CacheStrategydisplayedRange - the range of currently displayed rowscachedRange - the range of currently cached rowsestimatedAvailableRange - the estimated range of rows available for the data source
public abstract int getMaximumCacheSize(int pageSize)
pageSize - the current number of items used at once
public abstract int getMinimumCacheSize(int pageSize)
pageSize - the current number of items used at once
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||