ru.goodidea.df.dictionary.datasource
Class DistributedTableClientCache
java.lang.Object
ru.goodidea.df.dictionary.datasource.DistributedTableClientCache
public class DistributedTableClientCache
- extends java.lang.Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DistributedTableClientCache
public DistributedTableClientCache(int chunkSize,
int maximumCacheSize,
IDistributedTableDataSource tableDataSource)
throws java.lang.Exception
- Creates new DistributedTableClientCache
- Parameters:
chunkSize - The number of rows of data that are to be retrieved from the
remote store at a time.maximumCacheSize - The maximum number of rows that will be cached. When this
number is exceeded by new data that has been fetched, the
oldest data is overwritten. tableDataSource A source of table
data, (via the method retrieveRows).
- Throws:
java.lang.Exception
remove
public void remove(int pos)
reread
public void reread(java.lang.String cmd)
retrieveRowFromCache
public Entity retrieveRowFromCache(int rowIndex)
- Retrieves a row from the data cache. If the row is not currently in the
cache it will be retrieved from the DistributedTableDataSource object.
- Parameters:
rowIndex - The row index in the table that is to be retrieved.
indexOf
public int indexOf(Key key)
maxIndex
public int maxIndex()
sortOccurred
public void sortOccurred()
- Called after a sort has been carried out to nullify the data in the cache
so that the newly sorted data must be fetched from the server.
updateEntity
public boolean updateEntity(int row)
addEntity
public int addEntity(Entity entity)
scanRecord
public int scanRecord(Key key)
dump
public void dump()
Copyright © 2009. All Rights Reserved.