Rename variable
This commit is contained in:
parent
49499f6697
commit
f28d94ea6c
3 changed files with 19 additions and 19 deletions
|
|
@ -195,11 +195,11 @@ public class LeaseManagementConfig {
|
|||
private BillingMode billingMode = BillingMode.PAY_PER_REQUEST;
|
||||
|
||||
/**
|
||||
* Whether to enabled deletion protection on the DyanmoDB lease table created by KCL.
|
||||
* Whether to enabled deletion protection on the DynamoDB lease table created by KCL.
|
||||
*
|
||||
* <p>Default value: false
|
||||
*/
|
||||
private boolean deletionProtectionEnabled = false;
|
||||
private boolean leaseTableDeletionProtectionEnabled = false;
|
||||
|
||||
/**
|
||||
* The list of tags to be applied to the DynamoDB table created for lease management.
|
||||
|
|
@ -389,7 +389,7 @@ public class LeaseManagementConfig {
|
|||
tableCreatorCallback(),
|
||||
dynamoDbRequestTimeout(),
|
||||
billingMode(),
|
||||
deletionProtectionEnabled(),
|
||||
leaseTableDeletionProtectionEnabled(),
|
||||
tags(),
|
||||
leaseSerializer,
|
||||
customShardDetectorProvider(),
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ public class DynamoDBLeaseManagementFactory implements LeaseManagementFactory {
|
|||
private final TableCreatorCallback tableCreatorCallback;
|
||||
private final Duration dynamoDbRequestTimeout;
|
||||
private final BillingMode billingMode;
|
||||
private final boolean deletionProtectionEnabled;
|
||||
private final boolean leaseTableDeletionProtectionEnabled;
|
||||
private final Collection<Tag> tags;
|
||||
private final boolean isMultiStreamMode;
|
||||
private final LeaseCleanupConfig leaseCleanupConfig;
|
||||
|
|
@ -484,7 +484,7 @@ public class DynamoDBLeaseManagementFactory implements LeaseManagementFactory {
|
|||
* @param tableCreatorCallback
|
||||
* @param dynamoDbRequestTimeout
|
||||
* @param billingMode
|
||||
* @param deletionProtectionEnabled
|
||||
* @param leaseTableDeletionProtectionEnabled
|
||||
* @param tags
|
||||
*/
|
||||
private DynamoDBLeaseManagementFactory(final KinesisAsyncClient kinesisClient, final StreamConfig streamConfig,
|
||||
|
|
@ -497,7 +497,7 @@ public class DynamoDBLeaseManagementFactory implements LeaseManagementFactory {
|
|||
final long listShardsCacheAllowedAgeInSeconds, final int cacheMissWarningModulus,
|
||||
final long initialLeaseTableReadCapacity, final long initialLeaseTableWriteCapacity,
|
||||
final HierarchicalShardSyncer deprecatedHierarchicalShardSyncer, final TableCreatorCallback tableCreatorCallback,
|
||||
Duration dynamoDbRequestTimeout, BillingMode billingMode, final boolean deletionProtectionEnabled,
|
||||
Duration dynamoDbRequestTimeout, BillingMode billingMode, final boolean leaseTableDeletionProtectionEnabled,
|
||||
Collection<Tag> tags, LeaseSerializer leaseSerializer) {
|
||||
this(kinesisClient, dynamoDBClient, tableName,
|
||||
workerIdentifier, executorService, failoverTimeMillis, epsilonMillis, maxLeasesForWorker,
|
||||
|
|
@ -506,7 +506,7 @@ public class DynamoDBLeaseManagementFactory implements LeaseManagementFactory {
|
|||
maxListShardsRetryAttempts, maxCacheMissesBeforeReload, listShardsCacheAllowedAgeInSeconds,
|
||||
cacheMissWarningModulus, initialLeaseTableReadCapacity, initialLeaseTableWriteCapacity,
|
||||
deprecatedHierarchicalShardSyncer, tableCreatorCallback, dynamoDbRequestTimeout, billingMode,
|
||||
deletionProtectionEnabled, tags, leaseSerializer, null, false,
|
||||
leaseTableDeletionProtectionEnabled, tags, leaseSerializer, null, false,
|
||||
LeaseManagementConfig.DEFAULT_LEASE_CLEANUP_CONFIG);
|
||||
this.streamConfig = streamConfig;
|
||||
}
|
||||
|
|
@ -538,7 +538,7 @@ public class DynamoDBLeaseManagementFactory implements LeaseManagementFactory {
|
|||
* @param tableCreatorCallback
|
||||
* @param dynamoDbRequestTimeout
|
||||
* @param billingMode
|
||||
* @param deletionProtectionEnabled
|
||||
* @param leaseTableDeletionProtectionEnabled
|
||||
* @param leaseSerializer
|
||||
* @param customShardDetectorProvider
|
||||
* @param isMultiStreamMode
|
||||
|
|
@ -554,7 +554,7 @@ public class DynamoDBLeaseManagementFactory implements LeaseManagementFactory {
|
|||
final long listShardsCacheAllowedAgeInSeconds, final int cacheMissWarningModulus,
|
||||
final long initialLeaseTableReadCapacity, final long initialLeaseTableWriteCapacity,
|
||||
final HierarchicalShardSyncer deprecatedHierarchicalShardSyncer, final TableCreatorCallback tableCreatorCallback,
|
||||
Duration dynamoDbRequestTimeout, BillingMode billingMode, final boolean deletionProtectionEnabled,
|
||||
Duration dynamoDbRequestTimeout, BillingMode billingMode, final boolean leaseTableDeletionProtectionEnabled,
|
||||
Collection<Tag> tags, LeaseSerializer leaseSerializer,
|
||||
Function<StreamConfig, ShardDetector> customShardDetectorProvider, boolean isMultiStreamMode,
|
||||
LeaseCleanupConfig leaseCleanupConfig) {
|
||||
|
|
@ -583,7 +583,7 @@ public class DynamoDBLeaseManagementFactory implements LeaseManagementFactory {
|
|||
this.tableCreatorCallback = tableCreatorCallback;
|
||||
this.dynamoDbRequestTimeout = dynamoDbRequestTimeout;
|
||||
this.billingMode = billingMode;
|
||||
this.deletionProtectionEnabled = deletionProtectionEnabled;
|
||||
this.leaseTableDeletionProtectionEnabled = leaseTableDeletionProtectionEnabled;
|
||||
this.leaseSerializer = leaseSerializer;
|
||||
this.customShardDetectorProvider = customShardDetectorProvider;
|
||||
this.isMultiStreamMode = isMultiStreamMode;
|
||||
|
|
@ -655,7 +655,7 @@ public class DynamoDBLeaseManagementFactory implements LeaseManagementFactory {
|
|||
@Override
|
||||
public DynamoDBLeaseRefresher createLeaseRefresher() {
|
||||
return new DynamoDBLeaseRefresher(tableName, dynamoDBClient, leaseSerializer, consistentReads,
|
||||
tableCreatorCallback, dynamoDbRequestTimeout, billingMode, deletionProtectionEnabled, tags);
|
||||
tableCreatorCallback, dynamoDbRequestTimeout, billingMode, leaseTableDeletionProtectionEnabled, tags);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ public class DynamoDBLeaseRefresher implements LeaseRefresher {
|
|||
|
||||
private final Duration dynamoDbRequestTimeout;
|
||||
private final BillingMode billingMode;
|
||||
private final boolean deletionProtectionEnabled;
|
||||
private final boolean leaseTableDeletionProtectionEnabled;
|
||||
private final Collection<Tag> tags;
|
||||
|
||||
private boolean newTableCreated = false;
|
||||
|
|
@ -147,15 +147,15 @@ public class DynamoDBLeaseRefresher implements LeaseRefresher {
|
|||
* @param tableCreatorCallback
|
||||
* @param dynamoDbRequestTimeout
|
||||
* @param billingMode
|
||||
* @param deletionProtectionEnabled
|
||||
* @param leaseTableDeletionProtectionEnabled
|
||||
*/
|
||||
@Deprecated
|
||||
public DynamoDBLeaseRefresher(final String table, final DynamoDbAsyncClient dynamoDBClient,
|
||||
final LeaseSerializer serializer, final boolean consistentReads,
|
||||
@NonNull final TableCreatorCallback tableCreatorCallback, Duration dynamoDbRequestTimeout,
|
||||
final BillingMode billingMode, final boolean deletionProtectionEnabled) {
|
||||
final BillingMode billingMode, final boolean leaseTableDeletionProtectionEnabled) {
|
||||
this(table, dynamoDBClient, serializer, consistentReads, tableCreatorCallback, dynamoDbRequestTimeout,
|
||||
billingMode, deletionProtectionEnabled, DefaultSdkAutoConstructList.getInstance());
|
||||
billingMode, leaseTableDeletionProtectionEnabled, DefaultSdkAutoConstructList.getInstance());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -167,13 +167,13 @@ public class DynamoDBLeaseRefresher implements LeaseRefresher {
|
|||
* @param tableCreatorCallback
|
||||
* @param dynamoDbRequestTimeout
|
||||
* @param billingMode
|
||||
* @param deletionProtectionEnabled
|
||||
* @param leaseTableDeletionProtectionEnabled
|
||||
* @param tags
|
||||
*/
|
||||
public DynamoDBLeaseRefresher(final String table, final DynamoDbAsyncClient dynamoDBClient,
|
||||
final LeaseSerializer serializer, final boolean consistentReads,
|
||||
@NonNull final TableCreatorCallback tableCreatorCallback, Duration dynamoDbRequestTimeout,
|
||||
final BillingMode billingMode, final boolean deletionProtectionEnabled,
|
||||
final BillingMode billingMode, final boolean leaseTableDeletionProtectionEnabled,
|
||||
final Collection<Tag> tags) {
|
||||
this.table = table;
|
||||
this.dynamoDBClient = dynamoDBClient;
|
||||
|
|
@ -182,7 +182,7 @@ public class DynamoDBLeaseRefresher implements LeaseRefresher {
|
|||
this.tableCreatorCallback = tableCreatorCallback;
|
||||
this.dynamoDbRequestTimeout = dynamoDbRequestTimeout;
|
||||
this.billingMode = billingMode;
|
||||
this.deletionProtectionEnabled = deletionProtectionEnabled;
|
||||
this.leaseTableDeletionProtectionEnabled = leaseTableDeletionProtectionEnabled;
|
||||
this.tags = tags;
|
||||
}
|
||||
|
||||
|
|
@ -811,7 +811,7 @@ public class DynamoDBLeaseRefresher implements LeaseRefresher {
|
|||
private CreateTableRequest.Builder createTableRequestBuilder() {
|
||||
final CreateTableRequest.Builder builder = CreateTableRequest.builder().tableName(table).keySchema(serializer.getKeySchema())
|
||||
.attributeDefinitions(serializer.getAttributeDefinitions())
|
||||
.deletionProtectionEnabled(deletionProtectionEnabled)
|
||||
.deletionProtectionEnabled(leaseTableDeletionProtectionEnabled)
|
||||
.tags(tags);
|
||||
if (BillingMode.PAY_PER_REQUEST.equals(billingMode)) {
|
||||
builder.billingMode(billingMode);
|
||||
|
|
|
|||
Loading…
Reference in a new issue