构造器和说明 |
---|
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
LogException
public 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
在接口中 Producer
InterruptedException
LogException
@Deprecated public void sendLogGroup(String hashKey, String topicId, String source, String filename, PutLogRequest.LogGroup logGroup, CallBack callBack) throws InterruptedException, LogException
sendLogGroup
在接口中 Producer
InterruptedException
LogException
public void sendLogV2(String hashKey, String topicId, String source, String filename, LogItem log, CallBack callBack) throws InterruptedException, LogException
sendLogV2
在接口中 Producer
hashKey
- 路由Shard的keytopicId
- 日志主题IDsource
- 日志来源filename
- 日志路径log
- 待写入日志callBack
- 回调函数InterruptedException
LogException
public void sendLogsV2(String hashKey, String topicId, String source, String filename, List<LogItem> logs, CallBack callBack) throws InterruptedException, LogException
sendLogsV2
在接口中 Producer
hashKey
- 路由Shard的keytopicId
- 日志主题idsource
- 日志来源filename
- 日志路径logs
- 待写入日志callBack
- 回调函数InterruptedException
LogException
public void resetAccessKeyToken(String accessKey, String secretKey, String securityToken) throws LogException
resetAccessKeyToken
在接口中 Producer
accessKey
- 访问api的keysecretKey
- 访问api的secretsecurityToken
- 临时访问凭证tokenLogException
public void start() throws LogException
Producer
start
在接口中 Producer
LogException
public void close() throws InterruptedException, LogException
Producer
close
在接口中 Producer
InterruptedException
LogException
public void close(long timeoutMs) throws InterruptedException, LogException
Producer
close
在接口中 Producer
timeoutMs
- 超时等待时间InterruptedException
LogException
public void closeNow() throws InterruptedException, LogException
Producer
closeNow
在接口中 Producer
InterruptedException
LogException
public void config(ProducerConfig producerConfig) throws LogException
Producer
config
在接口中 Producer
LogException
Copyright © 2024. All rights reserved.