@Tags(value={"lookup","cache","enrich","join","rdbms","database","reloadable","key","value"}) @CapabilityDescription(value="A relational-database-based lookup service. When the lookup key is found in the database, the specified lookup value column is returned. Only one value will be returned for each lookup, duplicate database entries are ignored.") public class SimpleDatabaseLookupService extends AbstractDatabaseLookupService implements StringLookupService
| Modifier and Type | Field and Description |
|---|---|
private com.github.benmanes.caffeine.cache.Cache<Tuple<String,Object>,String> |
cache |
(package private) static PropertyDescriptor |
LOOKUP_VALUE_COLUMN |
CACHE_EXPIRATION, CACHE_SIZE, CLEAR_CACHE_ON_ENABLED, DBCP_SERVICE, dbcpService, KEY, LOOKUP_KEY_COLUMN, lookupKeyColumn, properties, REQUIRED_KEYS, TABLE_NAME| Constructor and Description |
|---|
SimpleDatabaseLookupService() |
| Modifier and Type | Method and Description |
|---|---|
Set<String> |
getRequiredKeys() |
protected void |
init(ControllerServiceInitializationContext context) |
Optional<String> |
lookup(Map<String,Object> coordinates) |
Optional<String> |
lookup(Map<String,Object> coordinates,
Map<String,String> context) |
void |
onEnabled(ConfigurationContext context) |
getSupportedPropertyDescriptorsabstractClearConfigContext, abstractStoreConfigContext, disabled, enabled, getConfigurationContext, getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, getProperty, getStateManager, initialize, isEnabledcustomValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, toString, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetValueTypeinitialize, isStatefulgetIdentifier, getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validatestatic final PropertyDescriptor LOOKUP_VALUE_COLUMN
protected void init(ControllerServiceInitializationContext context)
init in class AbstractControllerService@OnEnabled public void onEnabled(ConfigurationContext context)
public Optional<String> lookup(Map<String,Object> coordinates) throws LookupFailureException
lookup in interface LookupService<String>LookupFailureExceptionpublic Optional<String> lookup(Map<String,Object> coordinates, Map<String,String> context) throws LookupFailureException
lookup in interface LookupService<String>LookupFailureExceptionpublic Set<String> getRequiredKeys()
getRequiredKeys in interface LookupService<String>Copyright © 2023 Apache NiFi Project. All rights reserved.