public class ProducerConfig extends Object
限定符和类型 | 字段和说明 |
---|---|
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_RESERVED_ATTEMPTS |
static int |
MAX_RETRY_COUNT |
static int |
MAX_THREAD_COUNT |
static int |
MIN_WAIT_MS |
static int |
TOO_MANY_REQUEST_ERROR |
构造器和说明 |
---|
ProducerConfig(String endpoint,
String region,
String accessKey,
String accessSecret) |
ProducerConfig(String endpoint,
String region,
String accessKey,
String accessSecret,
String token) |
限定符和类型 | 方法和说明 |
---|---|
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 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
LogException
public void setTotalSizeInBytes(int totalSizeInBytes) throws LogException
LogException
public void setMaxThreadCount(int maxThreadCount) throws LogException
LogException
public void setMaxBatchSizeBytes(int maxBatchSizeBytes) throws LogException
LogException
public void setMaxBatchCount(int maxBatchCount) throws LogException
LogException
public void setLingerMs(int lingerMs) throws LogException
LogException
public void setRetryCount(int retryCount) throws LogException
LogException
public void setMaxReservedAttempts(int maxReservedAttempts) throws LogException
LogException
public void setClientConfig(ClientConfig clientConfig) throws LogException
LogException
public void setShardCount(int shardCount) throws LogException
LogException
public void setMaxBlockMs(long maxBlockMs) throws LogException
LogException
public void checkBatchSize(int batchSize) throws LogException
LogException
Copyright © 2024. All rights reserved.