@EventDriven @SupportsBatching @Tags(value={"map","cache","put","distributed"}) @InputRequirement(value=INPUT_REQUIRED) @CapabilityDescription(value="Gets the content of a FlowFile and puts it to a distributed map cache, using a cache key computed from FlowFile attributes. If the cache already contains the entry and the cache update strategy is \'keep original\' the entry is not replaced.\'") @WritesAttribute(attribute="cached", description="All FlowFiles will have an attribute \'cached\'. The value of this attribute is true, is the FlowFile is cached, otherwise false.") @SeeAlso(classNames={"org.apache.nifi.distributed.cache.client.DistributedMapCacheClientService","org.apache.nifi.distributed.cache.server.map.DistributedMapCacheServer","org.apache.nifi.processors.standard.FetchDistributedMapCache"}) public class PutDistributedMapCache extends AbstractProcessor
Modifier and Type | Class and Description |
---|---|
static class |
PutDistributedMapCache.CacheValueDeserializer |
static class |
PutDistributedMapCache.CacheValueSerializer |
static class |
PutDistributedMapCache.StringSerializer
Simple string serializer, used for serializing the cache key
|
Modifier and Type | Field and Description |
---|---|
static PropertyDescriptor |
CACHE_ENTRY_IDENTIFIER |
static PropertyDescriptor |
CACHE_ENTRY_MAX_BYTES |
static AllowableValue |
CACHE_UPDATE_KEEP_ORIGINAL |
static AllowableValue |
CACHE_UPDATE_REPLACE |
static PropertyDescriptor |
CACHE_UPDATE_STRATEGY |
static String |
CACHED_ATTRIBUTE_NAME |
static PropertyDescriptor |
DISTRIBUTED_CACHE_SERVICE |
private Serializer<String> |
keySerializer |
static Relationship |
REL_FAILURE |
static Relationship |
REL_SUCCESS |
private Set<Relationship> |
relationships |
private Deserializer<byte[]> |
valueDeserializer |
private Serializer<byte[]> |
valueSerializer |
Constructor and Description |
---|
PutDistributedMapCache() |
Modifier and Type | Method and Description |
---|---|
Set<Relationship> |
getRelationships() |
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
void |
onTrigger(ProcessContext context,
ProcessSession session) |
onTrigger
getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrue
customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validate
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate
public static final String CACHED_ATTRIBUTE_NAME
public static final PropertyDescriptor DISTRIBUTED_CACHE_SERVICE
public static final PropertyDescriptor CACHE_ENTRY_IDENTIFIER
public static final AllowableValue CACHE_UPDATE_REPLACE
public static final AllowableValue CACHE_UPDATE_KEEP_ORIGINAL
public static final PropertyDescriptor CACHE_UPDATE_STRATEGY
public static final PropertyDescriptor CACHE_ENTRY_MAX_BYTES
public static final Relationship REL_SUCCESS
public static final Relationship REL_FAILURE
private final Set<Relationship> relationships
private final Serializer<String> keySerializer
private final Serializer<byte[]> valueSerializer
private final Deserializer<byte[]> valueDeserializer
protected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors
in class AbstractConfigurableComponent
public Set<Relationship> getRelationships()
getRelationships
in interface Processor
getRelationships
in class AbstractSessionFactoryProcessor
public void onTrigger(ProcessContext context, ProcessSession session) throws ProcessException
onTrigger
in class AbstractProcessor
ProcessException
Copyright © 2021 Apache NiFi Project. All rights reserved.