Skip to content

Commit af51f64

Browse files
committed
rename entry point
1 parent 3631f8d commit af51f64

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ This assumes that you have already installed the LaunchDarkly Java SDK.
4343

4444
5. When configuring your SDK client, add the DynamoDB feature store:
4545

46-
DynamoDbFeatureStoreBuilder store = DatabaseComponents.dynamoDbFeatureStore("my-table-name")
46+
DynamoDbFeatureStoreBuilder store = DynamoDbComponents.dynamoDbFeatureStore("my-table-name")
4747
.caching(FeatureStoreCaching.enabled().ttlSeconds(30));
4848
4949
LDConfig config = new LDConfig.Builder()
@@ -54,15 +54,15 @@ This assumes that you have already installed the LaunchDarkly Java SDK.
5454

5555
By default, the DynamoDB client will try to get your AWS credentials and region name from environment variables and/or local configuration files, as described in the AWS SDK documentation. There are methods in `DynamoDBFeatureStoreBuilder` for changing the configuration options. Alternatively, if you already have a fully configured DynamoDB client object, you can tell LaunchDarkly to use that:
5656

57-
DynamoDbFeatureStoreBuilder store = DatabaseComponents.dynamoDbFeatureStore("my-table-name")
57+
DynamoDbFeatureStoreBuilder store = DynamoDbComponents.dynamoDbFeatureStore("my-table-name")
5858
.existingClient(myDynamoDbClientInstance);
5959

6060
Caching behavior
6161
----------------
6262

6363
To reduce traffic to DynamoDB, there is an optional in-memory cache that retains the last known data for a configurable amount of time. This is on by default; to turn it off (and guarantee that the latest feature flag data will always be retrieved from DynamoDB for every flag evaluation), configure the store as follows:
6464

65-
DynamoDbFeatureStoreBuilder store = DatabaseComponents.dynamoDbFeatureStore("my-table-name")
65+
DynamoDbFeatureStoreBuilder store = DynamoDbComponents.dynamoDbFeatureStore("my-table-name")
6666
.caching(FeatureStoreCaching.disabled());
6767

6868
For other ways to control the behavior of the cache, see `DynamoDbFeatureStoreBuilder.caching()`.

src/main/java/com/launchdarkly/client/dynamodb/DatabaseComponents.java renamed to src/main/java/com/launchdarkly/client/dynamodb/DynamoDbComponents.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/**
66
* Entry point for using the DynamoDB feature store.
77
*/
8-
public abstract class DatabaseComponents {
8+
public abstract class DynamoDbComponents {
99
/**
1010
* Creates a builder for a DynamoDB feature store. You can modify any of the store's properties with
1111
* {@link DynamoDbFeatureStoreBuilder} methods before adding it to your client configuration with

src/main/java/com/launchdarkly/client/dynamodb/DynamoDbFeatureStoreBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
/**
1919
* Builder/factory class for the DynamoDB feature store.
2020
* <p>
21-
* Create this builder by calling {@link DatabaseComponents#dynamoDbFeatureStore(String)}, then
21+
* Create this builder by calling {@link DynamoDbComponents#dynamoDbFeatureStore(String)}, then
2222
* optionally modify its properties with builder methods, and then include it in your client
2323
* configuration with {@link LDConfig.Builder#featureStoreFactory(FeatureStoreFactory)}.
2424
* <p>

src/main/java/com/launchdarkly/client/dynamodb/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* https://docs.launchdarkly.com/v2.0/docs/using-a-persistent-feature-store
66
* <p>
77
* To use the DynamoDB feature store with the LaunchDarkly client, you will first obtain a
8-
* builder by calling {@link DatabaseComponents#dynamoDbFeatureStore(String)}, then optionally
8+
* builder by calling {@link DynamoDbComponents#dynamoDbFeatureStore(String)}, then optionally
99
* modify its properties, and then include it in your client configuration. For example:
1010
*
1111
* <pre>

src/test/java/com/launchdarkly/client/dynamodb/DynamoDbFeatureStoreTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ private void createTableIfNecessary() {
126126
}
127127

128128
private DynamoDbFeatureStoreBuilder baseBuilder() {
129-
return new DynamoDbFeatureStoreBuilder(TABLE_NAME)
129+
return DynamoDbComponents.dynamoDbFeatureStore(TABLE_NAME)
130130
.endpointAndRegion(DYNAMODB_ENDPOINT, Regions.US_EAST_1.name())
131131
.caching(cached ? FeatureStoreCaching.enabled().ttlSeconds(30) : FeatureStoreCaching.disabled())
132132
.credentials(getTestCredentials());

0 commit comments

Comments
 (0)