| 构造器和说明 |
|---|
ProducerImpl(ProducerConfig producerConfig) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
暂停Producer
|
void |
close(long timeoutMs)
暂停Producer
|
void |
closeNow()
立刻暂停Producer
|
void |
config(ProducerConfig producerConfig)
初始化Producer配置
|
static Producer |
defaultProducer(String endpoint,
String region,
String accessKey,
String accessSecret,
String token) |
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
|
public ProducerImpl(ProducerConfig producerConfig) throws LogException
LogExceptionpublic static Producer defaultProducer(String endpoint, String region, String accessKey, String accessSecret, String token) throws LogException
LogException@Deprecated public void sendLog(String hashKey, String topicId, String source, String filename, PutLogRequest.Log log, CallBack callBack) throws InterruptedException, LogException
sendLog 在接口中 ProducerInterruptedExceptionLogException@Deprecated public void sendLogGroup(String hashKey, String topicId, String source, String filename, PutLogRequest.LogGroup logGroup, CallBack callBack) throws InterruptedException, LogException
sendLogGroup 在接口中 ProducerInterruptedExceptionLogExceptionpublic void sendLogV2(String hashKey, String topicId, String source, String filename, LogItem log, CallBack callBack) throws InterruptedException, LogException
sendLogV2 在接口中 ProducerhashKey - 路由Shard的keytopicId - 日志主题IDsource - 日志来源filename - 日志路径log - 待写入日志callBack - 回调函数InterruptedExceptionLogExceptionpublic void sendLogsV2(String hashKey, String topicId, String source, String filename, List<LogItem> logs, CallBack callBack) throws InterruptedException, LogException
sendLogsV2 在接口中 ProducerhashKey - 路由Shard的keytopicId - 日志主题idsource - 日志来源filename - 日志路径logs - 待写入日志callBack - 回调函数InterruptedExceptionLogExceptionpublic void resetAccessKeyToken(String accessKey, String secretKey, String securityToken) throws LogException
resetAccessKeyToken 在接口中 ProduceraccessKey - 访问api的keysecretKey - 访问api的secretsecurityToken - 临时访问凭证tokenLogExceptionpublic void start()
throws LogException
Producerstart 在接口中 ProducerLogExceptionpublic void close()
throws InterruptedException,
LogException
Producerclose 在接口中 ProducerInterruptedExceptionLogExceptionpublic void close(long timeoutMs)
throws InterruptedException,
LogException
Producerclose 在接口中 ProducertimeoutMs - 超时等待时间InterruptedExceptionLogExceptionpublic void closeNow()
throws InterruptedException,
LogException
ProducercloseNow 在接口中 ProducerInterruptedExceptionLogExceptionpublic void config(ProducerConfig producerConfig) throws LogException
Producerconfig 在接口中 ProducerLogExceptionCopyright © 2024. All rights reserved.