public interface Producer
限定符和类型 | 方法和说明 |
---|---|
void |
close()
暂停Producer
|
void |
close(long timeoutMs)
暂停Producer
|
void |
closeNow()
立刻暂停Producer
|
void |
config(ProducerConfig producerConfig)
初始化Producer配置
|
void |
resetAccessKeyToken(String accessKey,
String secretKey,
String securityToken) |
void |
sendLog(String hashKey,
String topicId,
String source,
String filename,
PutLogRequest.Log log,
CallBack callBack)
已过时。
|
void |
sendLogGroup(String hashKey,
String topicId,
String source,
String filename,
PutLogRequest.LogGroup logGroup,
CallBack callBack)
已过时。
|
void |
sendLogsV2(String hashKey,
String topicId,
String source,
String filename,
List<LogItem> logs,
CallBack callBack) |
void |
sendLogV2(String hashKey,
String topicId,
String source,
String filename,
LogItem log,
CallBack callBack) |
void |
start()
启动Producer
|
@Deprecated void sendLog(String hashKey, String topicId, String source, String filename, PutLogRequest.Log log, CallBack callBack) throws InterruptedException, LogException
@Deprecated void sendLogGroup(String hashKey, String topicId, String source, String filename, PutLogRequest.LogGroup logGroup, CallBack callBack) throws InterruptedException, LogException
void sendLogV2(String hashKey, String topicId, String source, String filename, LogItem log, CallBack callBack) throws InterruptedException, LogException
hashKey
- 路由Shard的keytopicId
- 日志主题IDsource
- 日志来源filename
- 日志路径log
- 待写入日志callBack
- 回调函数InterruptedException
LogException
void sendLogsV2(String hashKey, String topicId, String source, String filename, List<LogItem> logs, CallBack callBack) throws InterruptedException, LogException
hashKey
- 路由Shard的keytopicId
- 日志主题idsource
- 日志来源filename
- 日志路径logs
- 待写入日志callBack
- 回调函数InterruptedException
LogException
void resetAccessKeyToken(String accessKey, String secretKey, String securityToken) throws LogException
accessKey
- 访问api的keysecretKey
- 访问api的secretsecurityToken
- 临时访问凭证tokenLogException
void start() throws LogException
LogException
void close() throws InterruptedException, LogException
void close(long timeoutMs) throws InterruptedException, LogException
timeoutMs
- 超时等待时间InterruptedException
LogException
void closeNow() throws InterruptedException, LogException
void config(ProducerConfig producerConfig) throws LogException
producerConfig
- LogException
Copyright © 2023. All rights reserved.