public class DefaultCache extends Object implements DatabaseLookupData.Cache
Modifier and Type | Method and Description |
---|---|
Object[] |
getRowFromCache(org.pentaho.di.core.row.RowMetaInterface lookupMeta,
Object[] lookupRow)
Returns the very first data row that matches all conditions or
null if none has been found. |
static DefaultCache |
newCache(DatabaseLookupData data,
int cacheSize) |
void |
storeRowInCache(DatabaseLookupMeta meta,
org.pentaho.di.core.row.RowMetaInterface lookupMeta,
Object[] lookupRow,
Object[] add)
Saved
add as data row and lookupRow as a key for searching it. |
public static DefaultCache newCache(DatabaseLookupData data, int cacheSize)
public Object[] getRowFromCache(org.pentaho.di.core.row.RowMetaInterface lookupMeta, Object[] lookupRow) throws org.pentaho.di.core.exception.KettleException
DatabaseLookupData.Cache
null
if none has been found.
Note, cache should keep the order in which elements were put into it.getRowFromCache
in interface DatabaseLookupData.Cache
lookupMeta
- meta object for dealing with lookupRow
lookupRow
- tuple containing values for comparisonnull
org.pentaho.di.core.exception.KettleException
public void storeRowInCache(DatabaseLookupMeta meta, org.pentaho.di.core.row.RowMetaInterface lookupMeta, Object[] lookupRow, Object[] add)
DatabaseLookupData.Cache
add
as data row and lookupRow
as a key for searching it.storeRowInCache
in interface DatabaseLookupData.Cache
meta
- step's metalookupMeta
- lookupRow
's metalookupRow
- tuple of keysadd
- tuple of data