1 /* 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"). 5 * You may not use this file except in compliance with the License. 6 * A copy of the License is located at 7 * 8 * http://aws.amazon.com/apache2.0 9 * 10 * or in the "license" file accompanying this file. This file is distributed 11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either 12 * express or implied. See the License for the specific language governing 13 * permissions and limitations under the License. 14 */ 15 16 package software.amazon.awssdk.enhanced.dynamodb; 17 18 import java.util.List; 19 import software.amazon.awssdk.annotations.NotThreadSafe; 20 import software.amazon.awssdk.annotations.SdkPublicApi; 21 import software.amazon.awssdk.annotations.ThreadSafe; 22 23 /** 24 * Shared interface components for {@link DynamoDbEnhancedClient} and {@link DynamoDbEnhancedAsyncClient}. Any common 25 * methods implemented by both of those classes or their builders are declared here. 26 */ 27 @SdkPublicApi 28 @ThreadSafe 29 public interface DynamoDbEnhancedResource { 30 /** 31 * Shared interface components for the builders of {@link DynamoDbEnhancedClient} and 32 * {@link DynamoDbEnhancedAsyncClient} 33 */ 34 @NotThreadSafe 35 interface Builder { 36 /** 37 * Specifies the extensions to load with the enhanced client. The extensions will be loaded in the strict order 38 * they are supplied here. Calling this method will override any bundled extensions that are loaded by default, 39 * namely the {@link software.amazon.awssdk.enhanced.dynamodb.extensions.VersionedRecordExtension}, so this 40 * extension must be included in the supplied list otherwise it will not be loaded. Providing an empty list here 41 * will cause no extensions to get loaded, effectively dropping the default ones. 42 * 43 * @param dynamoDbEnhancedClientExtensions a list of extensions to load with the enhanced client 44 */ extensions(DynamoDbEnhancedClientExtension... dynamoDbEnhancedClientExtensions)45 Builder extensions(DynamoDbEnhancedClientExtension... dynamoDbEnhancedClientExtensions); 46 47 /** 48 * Specifies the extensions to load with the enhanced client. The extensions will be loaded in the strict order 49 * they are supplied here. Calling this method will override any bundled extensions that are loaded by default, 50 * namely the {@link software.amazon.awssdk.enhanced.dynamodb.extensions.VersionedRecordExtension}, so this 51 * extension must be included in the supplied list otherwise it will not be loaded. Providing an empty list here 52 * will cause no extensions to get loaded, effectively dropping the default ones. 53 * 54 * @param dynamoDbEnhancedClientExtensions a list of extensions to load with the enhanced client 55 */ extensions(List<DynamoDbEnhancedClientExtension> dynamoDbEnhancedClientExtensions)56 Builder extensions(List<DynamoDbEnhancedClientExtension> dynamoDbEnhancedClientExtensions); 57 } 58 } 59