Class ProducerCache
java.lang.Object
org.apache.pulsar.functions.instance.ProducerCache
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleancontainsKey(ProducerCache.CacheArea cacheArea, String topic) booleancontainsKey(ProducerCache.CacheArea cacheArea, String topic, Object additionalCacheKey) <T> org.apache.pulsar.client.api.Producer<T>getOrCreateProducer(ProducerCache.CacheArea cacheArea, String topicName, Object additionalCacheKey, Callable<org.apache.pulsar.client.api.Producer<T>> supplier)
-
Constructor Details
-
ProducerCache
public ProducerCache()
-
-
Method Details
-
getOrCreateProducer
public <T> org.apache.pulsar.client.api.Producer<T> getOrCreateProducer(ProducerCache.CacheArea cacheArea, String topicName, Object additionalCacheKey, Callable<org.apache.pulsar.client.api.Producer<T>> supplier) -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
containsKey
-
containsKey
public boolean containsKey(ProducerCache.CacheArea cacheArea, String topic, Object additionalCacheKey)
-