public class ProducerConfig extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
AVAILABLE_PROCESSORS |
static long |
DEFAULT_BLOCK_MS |
static int |
DEFAULT_LINGER_MS |
static int |
DEFAULT_MAX_BATCH_COUNT |
static int |
DEFAULT_MAX_BATCH_SIZE |
static int |
DEFAULT_MAX_THREAD_COUNT |
static int |
DEFAULT_RESERVED_ATTEMPTS |
static int |
DEFAULT_RETRY_COUNT |
static int |
DEFAULT_SHARD_COUNT |
static int |
DEFAULT_TOTAL_SIZE_IN_BYTES |
static int |
EXTERNAL_ERROR |
static int |
MAX_BATCH_COUNT |
static int |
MAX_BATCH_SIZE |
static int |
MAX_LOG_GROUP_COUNT |
static int |
MAX_RESERVED_ATTEMPTS |
static int |
MAX_RETRY_COUNT |
static int |
MAX_THREAD_COUNT |
static int |
MIN_WAIT_MS |
static int |
TOO_MANY_REQUEST_ERROR |
| Constructor and Description |
|---|
ProducerConfig(String endpoint,
String region,
String accessKey,
String accessSecret) |
ProducerConfig(String endpoint,
String region,
String accessKey,
String accessSecret,
String token) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkBatchSize(int batchSize) |
static boolean |
needRetry(int httpCode) |
void |
setClientConfig(ClientConfig clientConfig) |
void |
setLingerMs(int lingerMs) |
void |
setMaxBatchCount(int maxBatchCount) |
void |
setMaxBatchSizeBytes(int maxBatchSizeBytes) |
void |
setMaxBlockMs(long maxBlockMs) |
void |
setMaxReservedAttempts(int maxReservedAttempts) |
void |
setMaxThreadCount(int maxThreadCount) |
void |
setRetryCount(int retryCount) |
void |
setShardCount(int shardCount) |
void |
setTotalSizeInBytes(int totalSizeInBytes) |
void |
validConfig() |
public static final int DEFAULT_TOTAL_SIZE_IN_BYTES
public static final int DEFAULT_MAX_THREAD_COUNT
public static final int DEFAULT_MAX_BATCH_SIZE
public static final int MAX_BATCH_SIZE
public static final int DEFAULT_MAX_BATCH_COUNT
public static final int MAX_BATCH_COUNT
public static final int MAX_LOG_GROUP_COUNT
public static final int DEFAULT_LINGER_MS
public static final int TOO_MANY_REQUEST_ERROR
public static final int EXTERNAL_ERROR
public static final int MIN_WAIT_MS
public static final int DEFAULT_RETRY_COUNT
public static final int DEFAULT_RESERVED_ATTEMPTS
public static final int MAX_RETRY_COUNT
public static final int MAX_RESERVED_ATTEMPTS
public static final int AVAILABLE_PROCESSORS
public static final int MAX_THREAD_COUNT
public static final int DEFAULT_SHARD_COUNT
public static final long DEFAULT_BLOCK_MS
public ProducerConfig(String endpoint, String region, String accessKey, String accessSecret, String token)
public static boolean needRetry(int httpCode)
public void validConfig()
throws LogException
LogExceptionpublic void setTotalSizeInBytes(int totalSizeInBytes)
throws LogException
LogExceptionpublic void setMaxThreadCount(int maxThreadCount)
throws LogException
LogExceptionpublic void setMaxBatchSizeBytes(int maxBatchSizeBytes)
throws LogException
LogExceptionpublic void setMaxBatchCount(int maxBatchCount)
throws LogException
LogExceptionpublic void setLingerMs(int lingerMs)
throws LogException
LogExceptionpublic void setRetryCount(int retryCount)
throws LogException
LogExceptionpublic void setMaxReservedAttempts(int maxReservedAttempts)
throws LogException
LogExceptionpublic void setClientConfig(ClientConfig clientConfig) throws LogException
LogExceptionpublic void setShardCount(int shardCount)
throws LogException
LogExceptionpublic void setMaxBlockMs(long maxBlockMs)
throws LogException
LogExceptionpublic void checkBatchSize(int batchSize)
throws LogException
LogExceptionCopyright © 2025. All rights reserved.