Class WindowContextImpl
java.lang.Object
org.apache.pulsar.functions.windowing.WindowContextImpl
- All Implemented Interfaces:
org.apache.pulsar.functions.api.WindowContext
public class WindowContextImpl
extends Object
implements org.apache.pulsar.functions.api.WindowContext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonggetCounter(String key) intorg.slf4j.LoggerintgetUserConfigValue(String key) getUserConfigValueOrDefault(String key, Object defaultValue) voidincrCounter(String key, long amount) <O> CompletableFuture<Void>voidputState(String key, ByteBuffer value) voidrecordMetric(String metricName, double value)
-
Constructor Details
-
WindowContextImpl
public WindowContextImpl(org.apache.pulsar.functions.api.Context context)
-
-
Method Details
-
getTenant
- Specified by:
getTenantin interfaceorg.apache.pulsar.functions.api.WindowContext
-
getNamespace
- Specified by:
getNamespacein interfaceorg.apache.pulsar.functions.api.WindowContext
-
getFunctionName
- Specified by:
getFunctionNamein interfaceorg.apache.pulsar.functions.api.WindowContext
-
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
- Specified by:
getFunctionVersionin interfaceorg.apache.pulsar.functions.api.WindowContext
-
getInputTopics
- Specified by:
getInputTopicsin interfaceorg.apache.pulsar.functions.api.WindowContext
-
getOutputTopic
- Specified by:
getOutputTopicin interfaceorg.apache.pulsar.functions.api.WindowContext
-
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
- Specified by:
incrCounterin interfaceorg.apache.pulsar.functions.api.WindowContext
-
getCounter
- Specified by:
getCounterin interfaceorg.apache.pulsar.functions.api.WindowContext
-
putState
- Specified by:
putStatein interfaceorg.apache.pulsar.functions.api.WindowContext
-
getState
- Specified by:
getStatein interfaceorg.apache.pulsar.functions.api.WindowContext
-
getUserConfigMap
- Specified by:
getUserConfigMapin interfaceorg.apache.pulsar.functions.api.WindowContext
-
getUserConfigValue
- Specified by:
getUserConfigValuein interfaceorg.apache.pulsar.functions.api.WindowContext
-
getUserConfigValueOrDefault
- Specified by:
getUserConfigValueOrDefaultin interfaceorg.apache.pulsar.functions.api.WindowContext
-
recordMetric
- Specified by:
recordMetricin interfaceorg.apache.pulsar.functions.api.WindowContext
-
publish
- Specified by:
publishin interfaceorg.apache.pulsar.functions.api.WindowContext
-
publish
public CompletableFuture<Void> publish(String topicName, Object object, String schemaOrSerdeClassName) - Specified by:
publishin interfaceorg.apache.pulsar.functions.api.WindowContext
-