Class WindowContextImpl
- java.lang.Object
-
- org.apache.pulsar.functions.windowing.WindowContextImpl
-
- All Implemented Interfaces:
org.apache.pulsar.functions.api.WindowContext
public class WindowContextImpl extends java.lang.Object implements org.apache.pulsar.functions.api.WindowContext
-
-
Constructor Summary
Constructors Constructor Description WindowContextImpl(org.apache.pulsar.functions.api.Context context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetCounter(java.lang.String key)java.lang.StringgetFunctionId()java.lang.StringgetFunctionName()java.lang.StringgetFunctionVersion()java.util.Collection<java.lang.String>getInputTopics()intgetInstanceId()org.slf4j.LoggergetLogger()java.lang.StringgetNamespace()intgetNumInstances()java.lang.StringgetOutputSchemaType()java.lang.StringgetOutputTopic()java.nio.ByteBuffergetState(java.lang.String key)java.lang.StringgetTenant()java.util.Map<java.lang.String,java.lang.Object>getUserConfigMap()java.util.Optional<java.lang.Object>getUserConfigValue(java.lang.String key)java.lang.ObjectgetUserConfigValueOrDefault(java.lang.String key, java.lang.Object defaultValue)voidincrCounter(java.lang.String key, long amount)java.util.concurrent.CompletableFuture<java.lang.Void>publish(java.lang.String topicName, java.lang.Object object, java.lang.String schemaOrSerdeClassName)<O> java.util.concurrent.CompletableFuture<java.lang.Void>publish(java.lang.String topicName, O object)voidputState(java.lang.String key, java.nio.ByteBuffer value)voidrecordMetric(java.lang.String metricName, double value)
-
-
-
Method Detail
-
getTenant
public java.lang.String getTenant()
- Specified by:
getTenantin interfaceorg.apache.pulsar.functions.api.WindowContext
-
getNamespace
public java.lang.String getNamespace()
- Specified by:
getNamespacein interfaceorg.apache.pulsar.functions.api.WindowContext
-
getFunctionName
public java.lang.String getFunctionName()
- Specified by:
getFunctionNamein interfaceorg.apache.pulsar.functions.api.WindowContext
-
getFunctionId
public java.lang.String getFunctionId()
- Specified by:
getFunctionIdin interfaceorg.apache.pulsar.functions.api.WindowContext
-
getInstanceId
public int getInstanceId()
- Specified by:
getInstanceIdin interfaceorg.apache.pulsar.functions.api.WindowContext
-
getNumInstances
public int getNumInstances()
- Specified by:
getNumInstancesin interfaceorg.apache.pulsar.functions.api.WindowContext
-
getFunctionVersion
public java.lang.String getFunctionVersion()
- Specified by:
getFunctionVersionin interfaceorg.apache.pulsar.functions.api.WindowContext
-
getInputTopics
public java.util.Collection<java.lang.String> getInputTopics()
- Specified by:
getInputTopicsin interfaceorg.apache.pulsar.functions.api.WindowContext
-
getOutputTopic
public java.lang.String getOutputTopic()
- Specified by:
getOutputTopicin interfaceorg.apache.pulsar.functions.api.WindowContext
-
getOutputSchemaType
public java.lang.String getOutputSchemaType()
- Specified by:
getOutputSchemaTypein interfaceorg.apache.pulsar.functions.api.WindowContext
-
getLogger
public org.slf4j.Logger getLogger()
- Specified by:
getLoggerin interfaceorg.apache.pulsar.functions.api.WindowContext
-
incrCounter
public void incrCounter(java.lang.String key, long amount)- Specified by:
incrCounterin interfaceorg.apache.pulsar.functions.api.WindowContext
-
getCounter
public long getCounter(java.lang.String key)
- Specified by:
getCounterin interfaceorg.apache.pulsar.functions.api.WindowContext
-
putState
public void putState(java.lang.String key, java.nio.ByteBuffer value)- Specified by:
putStatein interfaceorg.apache.pulsar.functions.api.WindowContext
-
getState
public java.nio.ByteBuffer getState(java.lang.String key)
- Specified by:
getStatein interfaceorg.apache.pulsar.functions.api.WindowContext
-
getUserConfigMap
public java.util.Map<java.lang.String,java.lang.Object> getUserConfigMap()
- Specified by:
getUserConfigMapin interfaceorg.apache.pulsar.functions.api.WindowContext
-
getUserConfigValue
public java.util.Optional<java.lang.Object> getUserConfigValue(java.lang.String key)
- Specified by:
getUserConfigValuein interfaceorg.apache.pulsar.functions.api.WindowContext
-
getUserConfigValueOrDefault
public java.lang.Object getUserConfigValueOrDefault(java.lang.String key, java.lang.Object defaultValue)- Specified by:
getUserConfigValueOrDefaultin interfaceorg.apache.pulsar.functions.api.WindowContext
-
recordMetric
public void recordMetric(java.lang.String metricName, double value)- Specified by:
recordMetricin interfaceorg.apache.pulsar.functions.api.WindowContext
-
publish
public <O> java.util.concurrent.CompletableFuture<java.lang.Void> publish(java.lang.String topicName, O object)- Specified by:
publishin interfaceorg.apache.pulsar.functions.api.WindowContext
-
publish
public java.util.concurrent.CompletableFuture<java.lang.Void> publish(java.lang.String topicName, java.lang.Object object, java.lang.String schemaOrSerdeClassName)- Specified by:
publishin interfaceorg.apache.pulsar.functions.api.WindowContext
-
-