Reformatting the constructors to be together in the Worker class.
This commit is contained in:
parent
d7de6df958
commit
d4c90b8748
1 changed files with 74 additions and 74 deletions
|
|
@ -228,6 +228,80 @@ public class Worker implements Runnable {
|
||||||
execService);
|
execService);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Backwards compatible constructors
|
||||||
|
/**
|
||||||
|
* This constructor is for binary compatibility with code compiled against version of the KCL that only have
|
||||||
|
* constructors taking "Client" objects.
|
||||||
|
*
|
||||||
|
* @param recordProcessorFactory
|
||||||
|
* Used to get record processor instances for processing data from shards
|
||||||
|
* @param config
|
||||||
|
* Kinesis Client Library configuration
|
||||||
|
* @param kinesisClient
|
||||||
|
* Kinesis Client used for fetching data
|
||||||
|
* @param dynamoDBClient
|
||||||
|
* DynamoDB client used for checkpoints and tracking leases
|
||||||
|
* @param cloudWatchClient
|
||||||
|
* CloudWatch Client for publishing metrics
|
||||||
|
*/
|
||||||
|
public Worker(
|
||||||
|
com.amazonaws.services.kinesis.clientlibrary.interfaces.IRecordProcessorFactory recordProcessorFactory,
|
||||||
|
KinesisClientLibConfiguration config, AmazonKinesisClient kinesisClient,
|
||||||
|
AmazonDynamoDBClient dynamoDBClient, AmazonCloudWatchClient cloudWatchClient) {
|
||||||
|
this(recordProcessorFactory, config, (AmazonKinesis) kinesisClient, (AmazonDynamoDB) dynamoDBClient,
|
||||||
|
(AmazonCloudWatch) cloudWatchClient);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This constructor is for binary compatibility with code compiled against version of the KCL that only have
|
||||||
|
* constructors taking "Client" objects.
|
||||||
|
*
|
||||||
|
* @param recordProcessorFactory
|
||||||
|
* Used to get record processor instances for processing data from shards
|
||||||
|
* @param config
|
||||||
|
* Kinesis Client Library configuration
|
||||||
|
* @param kinesisClient
|
||||||
|
* Kinesis Client used for fetching data
|
||||||
|
* @param dynamoDBClient
|
||||||
|
* DynamoDB client used for checkpoints and tracking leases
|
||||||
|
* @param cloudWatchClient
|
||||||
|
* CloudWatch Client for publishing metrics
|
||||||
|
* @param execService
|
||||||
|
* ExecutorService to use for processing records (support for multi-threaded consumption)
|
||||||
|
*/
|
||||||
|
public Worker(
|
||||||
|
com.amazonaws.services.kinesis.clientlibrary.interfaces.IRecordProcessorFactory recordProcessorFactory,
|
||||||
|
KinesisClientLibConfiguration config, AmazonKinesisClient kinesisClient,
|
||||||
|
AmazonDynamoDBClient dynamoDBClient, AmazonCloudWatchClient cloudWatchClient, ExecutorService execService) {
|
||||||
|
this(recordProcessorFactory, config, (AmazonKinesis) kinesisClient, (AmazonDynamoDB) dynamoDBClient,
|
||||||
|
(AmazonCloudWatch) cloudWatchClient, execService);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This constructor is for binary compatibility with code compiled against version of the KCL that only have
|
||||||
|
* constructors taking "Client" objects.
|
||||||
|
*
|
||||||
|
* @param recordProcessorFactory
|
||||||
|
* Used to get record processor instances for processing data from shards
|
||||||
|
* @param config
|
||||||
|
* Kinesis Client Library configuration
|
||||||
|
* @param kinesisClient
|
||||||
|
* Kinesis Client used for fetching data
|
||||||
|
* @param dynamoDBClient
|
||||||
|
* DynamoDB client used for checkpoints and tracking leases
|
||||||
|
* @param metricsFactory
|
||||||
|
* Metrics factory used to emit metrics
|
||||||
|
* @param execService
|
||||||
|
* ExecutorService to use for processing records (support for multi-threaded consumption)
|
||||||
|
*/
|
||||||
|
public Worker(
|
||||||
|
com.amazonaws.services.kinesis.clientlibrary.interfaces.IRecordProcessorFactory recordProcessorFactory,
|
||||||
|
KinesisClientLibConfiguration config, AmazonKinesisClient kinesisClient,
|
||||||
|
AmazonDynamoDBClient dynamoDBClient, IMetricsFactory metricsFactory, ExecutorService execService) {
|
||||||
|
this(recordProcessorFactory, config, (AmazonKinesis) kinesisClient, (AmazonDynamoDB) dynamoDBClient,
|
||||||
|
metricsFactory, execService);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param recordProcessorFactory
|
* @param recordProcessorFactory
|
||||||
* Used to get record processor instances for processing data from shards
|
* Used to get record processor instances for processing data from shards
|
||||||
|
|
@ -922,80 +996,6 @@ public class Worker implements Runnable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Backwards compatible constructors
|
|
||||||
/**
|
|
||||||
* This constructor is for binary compatibility with code compiled against version of the KCL that only have
|
|
||||||
* constructors taking "Client" objects.
|
|
||||||
*
|
|
||||||
* @param recordProcessorFactory
|
|
||||||
* Used to get record processor instances for processing data from shards
|
|
||||||
* @param config
|
|
||||||
* Kinesis Client Library configuration
|
|
||||||
* @param kinesisClient
|
|
||||||
* Kinesis Client used for fetching data
|
|
||||||
* @param dynamoDBClient
|
|
||||||
* DynamoDB client used for checkpoints and tracking leases
|
|
||||||
* @param cloudWatchClient
|
|
||||||
* CloudWatch Client for publishing metrics
|
|
||||||
*/
|
|
||||||
public Worker(
|
|
||||||
com.amazonaws.services.kinesis.clientlibrary.interfaces.IRecordProcessorFactory recordProcessorFactory,
|
|
||||||
KinesisClientLibConfiguration config, AmazonKinesisClient kinesisClient,
|
|
||||||
AmazonDynamoDBClient dynamoDBClient, AmazonCloudWatchClient cloudWatchClient) {
|
|
||||||
this(recordProcessorFactory, config, (AmazonKinesis) kinesisClient, (AmazonDynamoDB) dynamoDBClient,
|
|
||||||
(AmazonCloudWatch) cloudWatchClient);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This constructor is for binary compatibility with code compiled against version of the KCL that only have
|
|
||||||
* constructors taking "Client" objects.
|
|
||||||
*
|
|
||||||
* @param recordProcessorFactory
|
|
||||||
* Used to get record processor instances for processing data from shards
|
|
||||||
* @param config
|
|
||||||
* Kinesis Client Library configuration
|
|
||||||
* @param kinesisClient
|
|
||||||
* Kinesis Client used for fetching data
|
|
||||||
* @param dynamoDBClient
|
|
||||||
* DynamoDB client used for checkpoints and tracking leases
|
|
||||||
* @param cloudWatchClient
|
|
||||||
* CloudWatch Client for publishing metrics
|
|
||||||
* @param execService
|
|
||||||
* ExecutorService to use for processing records (support for multi-threaded consumption)
|
|
||||||
*/
|
|
||||||
public Worker(
|
|
||||||
com.amazonaws.services.kinesis.clientlibrary.interfaces.IRecordProcessorFactory recordProcessorFactory,
|
|
||||||
KinesisClientLibConfiguration config, AmazonKinesisClient kinesisClient,
|
|
||||||
AmazonDynamoDBClient dynamoDBClient, AmazonCloudWatchClient cloudWatchClient, ExecutorService execService) {
|
|
||||||
this(recordProcessorFactory, config, (AmazonKinesis) kinesisClient, (AmazonDynamoDB) dynamoDBClient,
|
|
||||||
(AmazonCloudWatch) cloudWatchClient, execService);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This constructor is for binary compatibility with code compiled against version of the KCL that only have
|
|
||||||
* constructors taking "Client" objects.
|
|
||||||
*
|
|
||||||
* @param recordProcessorFactory
|
|
||||||
* Used to get record processor instances for processing data from shards
|
|
||||||
* @param config
|
|
||||||
* Kinesis Client Library configuration
|
|
||||||
* @param kinesisClient
|
|
||||||
* Kinesis Client used for fetching data
|
|
||||||
* @param dynamoDBClient
|
|
||||||
* DynamoDB client used for checkpoints and tracking leases
|
|
||||||
* @param metricsFactory
|
|
||||||
* Metrics factory used to emit metrics
|
|
||||||
* @param execService
|
|
||||||
* ExecutorService to use for processing records (support for multi-threaded consumption)
|
|
||||||
*/
|
|
||||||
public Worker(
|
|
||||||
com.amazonaws.services.kinesis.clientlibrary.interfaces.IRecordProcessorFactory recordProcessorFactory,
|
|
||||||
KinesisClientLibConfiguration config, AmazonKinesisClient kinesisClient,
|
|
||||||
AmazonDynamoDBClient dynamoDBClient, IMetricsFactory metricsFactory, ExecutorService execService) {
|
|
||||||
this(recordProcessorFactory, config, (AmazonKinesis) kinesisClient, (AmazonDynamoDB) dynamoDBClient,
|
|
||||||
metricsFactory, execService);
|
|
||||||
}
|
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
StreamConfig getStreamConfig() {
|
StreamConfig getStreamConfig() {
|
||||||
return streamConfig;
|
return streamConfig;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue