Package org.qubership.nifi.service
Class RedisBulkDistributedMapCacheClientService
java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.controller.AbstractControllerService
org.qubership.nifi.service.RedisBulkDistributedMapCacheClientService
- All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent,org.apache.nifi.controller.ControllerService,BulkDistributedMapCacheClient
@Tags({"redis","distributed","cache","map"})
@CapabilityDescription("")
public class RedisBulkDistributedMapCacheClientService
extends org.apache.nifi.controller.AbstractControllerService
implements BulkDistributedMapCacheClient
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.apache.nifi.components.PropertyDescriptorstatic final org.apache.nifi.components.PropertyDescriptor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<K> booleancontainsKey(K key, org.apache.nifi.distributed.cache.client.Serializer<K> keySerializer) <K,V> V get(K key, org.apache.nifi.distributed.cache.client.Serializer<K> keySerializer, org.apache.nifi.distributed.cache.client.Deserializer<V> valueDeserializer) <K,V> Map <K, V> getAndPutIfAbsent(Map<K, V> map, org.apache.nifi.distributed.cache.client.Serializer<K> keySerializer, org.apache.nifi.distributed.cache.client.Serializer<V> valueSerializer, org.apache.nifi.distributed.cache.client.Deserializer<V> valueDeserializer) protected List<org.apache.nifi.components.PropertyDescriptor> Allows subclasses to register which property descriptor objects are supported.voidonEnabled(org.apache.nifi.controller.ConfigurationContext context) <K,V> void put(K key, V value, org.apache.nifi.distributed.cache.client.Serializer<K> keySerializer, org.apache.nifi.distributed.cache.client.Serializer<V> valueSerializer) <K,V> boolean putIfAbsent(K key, V value, org.apache.nifi.distributed.cache.client.Serializer<K> keySerializer, org.apache.nifi.distributed.cache.client.Serializer<V> valueSerializer) <K> longvoidshutdown()This method is called during disable controller services.Methods inherited from class org.apache.nifi.controller.AbstractControllerService
abstractClearConfigContext, abstractStoreConfigContext, disabled, enabled, getConfigurationContext, getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, getProperty, getStateManager, init, initialize, isEnabledMethods inherited from class org.apache.nifi.components.AbstractConfigurableComponent
customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, toString, validateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.nifi.components.ConfigurableComponent
getIdentifier, getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateMethods inherited from interface org.apache.nifi.controller.ControllerService
initialize, isStateful, migrateProperties
-
Field Details
-
REDIS_CONNECTION_POOL
public static final org.apache.nifi.components.PropertyDescriptor REDIS_CONNECTION_POOL -
TTL
public static final org.apache.nifi.components.PropertyDescriptor TTL
-
-
Constructor Details
-
RedisBulkDistributedMapCacheClientService
public RedisBulkDistributedMapCacheClientService()
-
-
Method Details
-
getSupportedPropertyDescriptors
Allows subclasses to register which property descriptor objects are supported. Default return is an empty set.- Overrides:
getSupportedPropertyDescriptorsin classorg.apache.nifi.components.AbstractConfigurableComponent- Returns:
- PropertyDescriptor objects this processor currently supports
-
onEnabled
@OnEnabled public void onEnabled(org.apache.nifi.controller.ConfigurationContext context) throws org.apache.nifi.reporting.InitializationException - Parameters:
context- the configuration context- Throws:
org.apache.nifi.reporting.InitializationException- if unable to create a database connection
-
shutdown
@OnDisabled public void shutdown()This method is called during disable controller services. -
getAndPutIfAbsent
public <K,V> Map<K,V> getAndPutIfAbsent(Map<K, V> map, org.apache.nifi.distributed.cache.client.Serializer<K> keySerializer, org.apache.nifi.distributed.cache.client.Serializer<V> valueSerializer, org.apache.nifi.distributed.cache.client.Deserializer<V> valueDeserializer) throws IOException- Specified by:
getAndPutIfAbsentin interfaceBulkDistributedMapCacheClient- Throws:
IOException
-
remove
public <K> long remove(List<K> keys, org.apache.nifi.distributed.cache.client.Serializer<K> keySerializer) throws IOException - Specified by:
removein interfaceBulkDistributedMapCacheClient- Throws:
IOException
-
putIfAbsent
public <K,V> boolean putIfAbsent(K key, V value, org.apache.nifi.distributed.cache.client.Serializer<K> keySerializer, org.apache.nifi.distributed.cache.client.Serializer<V> valueSerializer) throws IOException - Specified by:
putIfAbsentin interfaceBulkDistributedMapCacheClient- Throws:
IOException
-
containsKey
public <K> boolean containsKey(K key, org.apache.nifi.distributed.cache.client.Serializer<K> keySerializer) throws IOException - Specified by:
containsKeyin interfaceBulkDistributedMapCacheClient- Throws:
IOException
-
put
public <K,V> void put(K key, V value, org.apache.nifi.distributed.cache.client.Serializer<K> keySerializer, org.apache.nifi.distributed.cache.client.Serializer<V> valueSerializer) throws IOException - Specified by:
putin interfaceBulkDistributedMapCacheClient- Throws:
IOException
-
get
public <K,V> V get(K key, org.apache.nifi.distributed.cache.client.Serializer<K> keySerializer, org.apache.nifi.distributed.cache.client.Deserializer<V> valueDeserializer) throws IOException - Specified by:
getin interfaceBulkDistributedMapCacheClient- Throws:
IOException
-