|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CacheStrategy
Determines what data an AbstractRemoteDataSource should fetch and
keep cached.
| Nested Class Summary | |
|---|---|
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. |
static class |
CacheStrategy.DefaultCacheStrategy
The default cache strategy used by AbstractRemoteDataSource,
using multiples of the page size for determining the minimum and maximum
number of items to keep in the cache. |
| 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. |
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. |
void |
onDataArrive(double roundTripTime,
int rowCount)
Called whenever data requested by the data source has arrived. |
| Method Detail |
|---|
void onDataArrive(double roundTripTime,
int rowCount)
A 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.
roundTripTime - the total number of milliseconds elapsed from requesting the
data until the response was passed to the data sourcerowCount - the number of received rows
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)
displayedRange - the range of currently displayed rowscachedRange - the range of currently cached rowsestimatedAvailableRange - the estimated range of rows available for the data source
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)
displayedRange - the range of currently displayed rowscachedRange - the range of currently cached rowsestimatedAvailableRange - the estimated range of rows available for the data source
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||