public interface Producer
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
暂停produver
|
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 - topicId - 日志主题idsource - 路由 Shard 的keyfilename - 日志路径log - 待写入日志callBack - 回调函数InterruptedExceptionLogExceptionvoid sendLogsV2(String hashKey, String topicId, String source, String filename, List<LogItem> logs, CallBack callBack) throws InterruptedException, LogException
hashKey - topicId - 日志主题idsource - 路由 Shard 的keyfilename - 日志路径logs - 待写入日志callBack - 回调函数InterruptedExceptionLogExceptionvoid resetAccessKeyToken(String accessKey, String secretKey, String securityToken) throws LogException
accessKey - 访问api的keysecretKey - 访问api的secretsecurityToken - 临时访问凭证tokenLogExceptionvoid start()
throws LogException
LogExceptionvoid close()
throws InterruptedException,
LogException
void closeNow()
throws InterruptedException,
LogException
void config(ProducerConfig producerConfig) throws LogException
producerConfig - LogExceptionCopyright © 2023. All rights reserved.