Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
pulsar
提交
2412f80f
pulsar
项目概览
apache
/
pulsar
通知
129
Star
40
Fork
3
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Wiki
1
Wiki
分析
仓库
DevOps
项目成员
Pages
pulsar
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Pages
分析
分析
仓库分析
DevOps
Wiki
1
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
提交
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
2412f80f
编写于
2月 27, 2018
作者:
S
Sanjeev Kulkarni
提交者:
Sijie Guo
3月 03, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added more comments to the JavaDoc (#253)
上级
41c9713f
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
12 addition
and
5 deletion
+12
-5
pulsar-functions/api-java/src/main/java/org/apache/pulsar/functions/api/Context.java
...rc/main/java/org/apache/pulsar/functions/api/Context.java
+12
-5
未找到文件。
pulsar-functions/api-java/src/main/java/org/apache/pulsar/functions/api/Context.java
浏览文件 @
2412f80f
...
...
@@ -105,9 +105,9 @@ public interface Context {
Logger
getLogger
();
/**
*
The counter object that can be used for counting.
*
* @
return the counter object.
*
Increment the builtin distributed counter refered by key
*
@param key The name of the key
* @
param amount The amount to be incremented
*/
void
incrCounter
(
String
key
,
long
amount
);
...
...
@@ -130,7 +130,7 @@ public interface Context {
* @param topicName The name of the topic for publishing
* @param object The object that needs to be published
* @param serDeClassName The class name of the class that needs to be used to serialize the object before publishing
* @return
* @return
A future that completes when the framework is done publishing the message
*/
<
O
>
CompletableFuture
<
Void
>
publish
(
String
topicName
,
O
object
,
String
serDeClassName
);
...
...
@@ -138,9 +138,16 @@ public interface Context {
* Publish an object using DefaultSerDe for serializing to the topic
* @param topicName The name of the topic for publishing
* @param object The object that needs to be published
* @return
* @return
A future that completes when the framework is done publishing the message
*/
<
O
>
CompletableFuture
<
Void
>
publish
(
String
topicName
,
O
object
);
/**
* By default acknowledgement management is done transparently by Pulsar Functions framework.
* However users can disable that and do ack management by themselves by using this API.
* @param messageId The messageId that needs to be acknowledged
* @param topic The topic name that the message belongs to that needs to be acknowledged
* @return A future that completes when the framework is done acking the message
*/
CompletableFuture
<
Void
>
ack
(
byte
[]
messageId
,
String
topic
);
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录