Class ReadAllCache
java.lang.Object
org.pentaho.di.trans.steps.databaselookup.readallcache.ReadAllCache
- All Implemented Interfaces:
DatabaseLookupData.Cache
This is a read-only array-based cache to be used in
DatabaseLookup when "Load All Data In Cache"
checkbox is selected. Internally, it uses some optimizations to reduce memory consumption.
- Author:
- Andrey Khayrutdinov
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionObject[]
getRowFromCache
(org.pentaho.di.core.row.RowMetaInterface lookupMeta, Object[] lookupRow) Returns the very first data row that matches all conditions ornull
if none has been found.void
storeRowInCache
(DatabaseLookupMeta meta, org.pentaho.di.core.row.RowMetaInterface lookupMeta, Object[] lookupRow, Object[] add) Savedadd
as data row andlookupRow
as a key for searching it.
-
Method Details
-
getRowFromCache
public Object[] getRowFromCache(org.pentaho.di.core.row.RowMetaInterface lookupMeta, Object[] lookupRow) throws org.pentaho.di.core.exception.KettleException Description copied from interface:DatabaseLookupData.Cache
Returns the very first data row that matches all conditions ornull
if none has been found. Note, cache should keep the order in which elements were put into it.- Specified by:
getRowFromCache
in interfaceDatabaseLookupData.Cache
- Parameters:
lookupMeta
- meta object for dealing withlookupRow
lookupRow
- tuple containing values for comparison- Returns:
- first matching data row or
null
- Throws:
org.pentaho.di.core.exception.KettleException
-
storeRowInCache
public void storeRowInCache(DatabaseLookupMeta meta, org.pentaho.di.core.row.RowMetaInterface lookupMeta, Object[] lookupRow, Object[] add) Description copied from interface:DatabaseLookupData.Cache
Savedadd
as data row andlookupRow
as a key for searching it.- Specified by:
storeRowInCache
in interfaceDatabaseLookupData.Cache
- Parameters:
meta
- step's metalookupMeta
-lookupRow
's metalookupRow
- tuple of keysadd
- tuple of data
-