public static class ThinkingDataAnalytics.BatchConsumer extends Object implements Consumer
| Modifier and Type | Class and Description |
|---|---|
static class |
ThinkingDataAnalytics.BatchConsumer.Config
BatchConsumer 的 配置类
|
| Constructor and Description |
|---|
BatchConsumer(String serverUrl,
String appId)
创建指定接收端地址和 APP ID 的 BatchConsumer
|
BatchConsumer(String serverUrl,
String appId,
int batchSize,
Integer timeout,
int interval)
创建指定接收端地址和 APP ID 的 BatchConsumer,并设定 batchSize, 网络请求 timeout, 发送频次
|
BatchConsumer(String serverUrl,
String appId,
int batchSize,
Integer timeout,
int interval,
String compress)
创建指定接收端地址和 APP ID 的 BatchConsumer,并设定 batchSize, 网络请求 timeout, 发送频次
|
BatchConsumer(String serverUrl,
String appId,
ThinkingDataAnalytics.BatchConsumer.Config config) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Map<String,Object> message) |
void |
close() |
void |
flush() |
public BatchConsumer(String serverUrl, String appId) throws URISyntaxException
serverUrl - 接收端地址appId - APP IDURISyntaxExceptionpublic BatchConsumer(String serverUrl, String appId, ThinkingDataAnalytics.BatchConsumer.Config config) throws URISyntaxException
serverUrl - 接收端地址appId - APP IDconfig - BatchConsumer配置类URISyntaxExceptionpublic BatchConsumer(String serverUrl, String appId, int batchSize, Integer timeout, int interval) throws URISyntaxException
serverUrl - 接收端地址appId - APP IDbatchSize - 缓存数目上线timeout - 超时时长,单位 msinterval - 发送间隔,单位秒URISyntaxExceptionpublic BatchConsumer(String serverUrl, String appId, int batchSize, Integer timeout, int interval, String compress) throws URISyntaxException
serverUrl - 接收端地址appId - APP IDbatchSize - 缓存数目上线timeout - 超时时长,单位 msinterval - 发送间隔,单位秒URISyntaxExceptionCopyright © 2020. All rights reserved.