/** * @param failoverTimeMillis Lease duration (leases not renewed within this period will be claimed by others) * @return KinesisClientLibConfiguration */ public KinesisClientLibConfiguration withFailoverTimeMillis(long failoverTimeMillis) { checkIsValuePositive("FailoverTimeMillis", failoverTimeMillis); this.failoverTimeMillis = failoverTimeMillis; return this; }
/** * @param shutdownGraceMillis Time before gracefully shutdown forcefully terminates * @return KinesisClientLibConfiguration */ public KinesisClientLibConfiguration withShutdownGraceMillis(long shutdownGraceMillis) { checkIsValuePositive("ShutdownGraceMillis", shutdownGraceMillis); this.shutdownGraceMillis = shutdownGraceMillis; return this; }
/** * @param maxListShardsRetryAttempts Max number of retries for listShards when throttled * in {@link com.amazonaws.services.kinesis.clientlibrary.proxies.KinesisProxy}. * @return */ public KinesisClientLibConfiguration withMaxListShardsRetryAttempts(int maxListShardsRetryAttempts) { checkIsValuePositive("maxListShardsRetryAttempts", maxListShardsRetryAttempts); this.maxListShardsRetryAttempts = maxListShardsRetryAttempts; return this; } }
/** * @param maxRecords Max records to fetch in a Kinesis getRecords() call * @return KinesisClientLibConfiguration */ public KinesisClientLibConfiguration withMaxRecords(int maxRecords) { checkIsValuePositive("MaxRecords", (long) maxRecords); this.maxRecords = maxRecords; return this; }
/** * @param parentShardPollIntervalMillis Wait for this long between polls to check if parent shards are done * @return KinesisClientLibConfiguration */ public KinesisClientLibConfiguration withParentShardPollIntervalMillis(long parentShardPollIntervalMillis) { checkIsValuePositive("ParentShardPollIntervalMillis", parentShardPollIntervalMillis); this.parentShardPollIntervalMillis = parentShardPollIntervalMillis; return this; }
/** * @param initialLeaseTableReadCapacity Read capacity to provision when creating the lease table. * @return KinesisClientLibConfiguration */ public KinesisClientLibConfiguration withInitialLeaseTableReadCapacity(int initialLeaseTableReadCapacity) { checkIsValuePositive("initialLeaseTableReadCapacity", initialLeaseTableReadCapacity); this.initialLeaseTableReadCapacity = initialLeaseTableReadCapacity; return this; }
/** * @param shardSyncIntervalMillis Time between tasks to sync leases and Kinesis shards * @return KinesisClientLibConfiguration */ public KinesisClientLibConfiguration withShardSyncIntervalMillis(long shardSyncIntervalMillis) { checkIsValuePositive("ShardSyncIntervalMillis", shardSyncIntervalMillis); this.shardSyncIntervalMillis = shardSyncIntervalMillis; return this; }
/** * @param initialLeaseTableWriteCapacity Write capacity to provision when creating the lease table. * @return KinesisClientLibConfiguration */ public KinesisClientLibConfiguration withInitialLeaseTableWriteCapacity(int initialLeaseTableWriteCapacity) { checkIsValuePositive("initialLeaseTableWriteCapacity", initialLeaseTableWriteCapacity); this.initialLeaseTableWriteCapacity = initialLeaseTableWriteCapacity; return this; }
/** * @param listShardsBackoffTimeInMillis Max sleep between two listShards call when throttled * in {@link com.amazonaws.services.kinesis.clientlibrary.proxies.KinesisProxy}. * @return */ public KinesisClientLibConfiguration withListShardsBackoffTimeInMillis(long listShardsBackoffTimeInMillis) { checkIsValuePositive("listShardsBackoffTimeInMillis", listShardsBackoffTimeInMillis); this.listShardsBackoffTimeInMillis = listShardsBackoffTimeInMillis; return this; }
/** * Max leases to steal from a more loaded Worker at one time (for load balancing). * Setting this to a higher number can allow for faster load convergence (e.g. during deployments, cold starts), * but can cause higher churn in the system. * * @param maxLeasesToStealAtOneTime Steal up to this many leases at one time (for load balancing) * @return KinesisClientLibConfiguration */ public KinesisClientLibConfiguration withMaxLeasesToStealAtOneTime(int maxLeasesToStealAtOneTime) { checkIsValuePositive("maxLeasesToStealAtOneTime", maxLeasesToStealAtOneTime); this.maxLeasesToStealAtOneTime = maxLeasesToStealAtOneTime; return this; }
/** * @param taskBackoffTimeMillis Backoff period when tasks encounter an exception * @return KinesisClientLibConfiguration */ public KinesisClientLibConfiguration withTaskBackoffTimeMillis(long taskBackoffTimeMillis) { checkIsValuePositive("TaskBackoffTimeMillis", taskBackoffTimeMillis); this.taskBackoffTimeMillis = taskBackoffTimeMillis; return this; }
/** * @param metricsBufferTimeMillis Metrics are buffered for at most this long before publishing to CloudWatch * @return KinesisClientLibConfiguration */ public KinesisClientLibConfiguration withMetricsBufferTimeMillis(long metricsBufferTimeMillis) { checkIsValuePositive("MetricsBufferTimeMillis", metricsBufferTimeMillis); this.metricsBufferTimeMillis = metricsBufferTimeMillis; return this; }
/** * @param metricsMaxQueueSize Max number of metrics to buffer before publishing to CloudWatch * @return KinesisClientLibConfiguration */ public KinesisClientLibConfiguration withMetricsMaxQueueSize(int metricsMaxQueueSize) { checkIsValuePositive("MetricsMaxQueueSize", (long) metricsMaxQueueSize); this.metricsMaxQueueSize = metricsMaxQueueSize; return this; }
/** * @param retryGetRecordsInSeconds the time in seconds to wait before the worker retries to get a record. * @return this configuration object. */ public KinesisClientLibConfiguration withRetryGetRecordsInSeconds(final int retryGetRecordsInSeconds) { checkIsValuePositive("retryGetRecordsInSeconds", retryGetRecordsInSeconds); this.retryGetRecordsInSeconds = Optional.of(retryGetRecordsInSeconds); return this; }
/** *@param maxGetRecordsThreadPool the max number of threads in the getRecords thread pool. *@return this configuration object */ public KinesisClientLibConfiguration withMaxGetRecordsThreadPool(final int maxGetRecordsThreadPool) { checkIsValuePositive("maxGetRecordsThreadPool", maxGetRecordsThreadPool); this.maxGetRecordsThreadPool = Optional.of(maxGetRecordsThreadPool); return this; }
/** * @param logWarningForTaskAfterMillis Logs warn message if as task is held in a task for more than the set * time. * @return KinesisClientLibConfiguration */ public KinesisClientLibConfiguration withLogWarningForTaskAfterMillis(long logWarningForTaskAfterMillis) { checkIsValuePositive("LogProcessTaskStatusAfterInMillis", logWarningForTaskAfterMillis); this.logWarningForTaskAfterMillis = Optional.of(logWarningForTaskAfterMillis); return this; }
/** * @param idleMillisBetweenCalls Idle time between 2 getcalls from the data fetcher. * @return KinesisClientLibConfiguration */ public KinesisClientLibConfiguration withIdleMillisBetweenCalls(long idleMillisBetweenCalls) { checkIsValuePositive("IdleMillisBetweenCalls", idleMillisBetweenCalls); this.recordsFetcherFactory.setIdleMillisBetweenCalls(idleMillisBetweenCalls); return this; }
/** * @param maxCacheByteSize Max byte size for the cache at any given point of time. After this threshold is crossed * the KinesisDataFetcher will be blocked until the cache has more space available. * @return KinesisClientLibConfiguration */ public KinesisClientLibConfiguration withMaxCacheByteSize(final int maxCacheByteSize) { checkIsValuePositive("maxCacheByteSize", maxCacheByteSize); this.recordsFetcherFactory.setMaxByteSize(maxCacheByteSize); return this; }
/** * * @param maxPendingProcessRecordsInput The max number of ProcessRecordsInput that can be stored in the cache before * blocking * @return this configuration object */ public KinesisClientLibConfiguration withMaxPendingProcessRecordsInput(final int maxPendingProcessRecordsInput) { checkIsValuePositive("maxPendingProcessRecordsInput", maxPendingProcessRecordsInput); this.recordsFetcherFactory.setMaxPendingProcessRecordsInput(maxPendingProcessRecordsInput); return this; }
/** * @param maxRecordsCount The maximum number of records in the cache, accross all ProcessRecordInput objects * @return KinesisClientLibConfiguration */ public KinesisClientLibConfiguration withMaxRecordsCount(final int maxRecordsCount) { checkIsValuePositive("maxRecordsCount", maxRecordsCount); this.recordsFetcherFactory.setMaxRecordsCount(maxRecordsCount); return this; }