Skip to content

Commit eca846d

Browse files
committed
Merge branch 'v2' into eb/v2-initial
# Conflicts: # src/test/java/com/launchdarkly/client/dynamodb/DynamoDbFeatureStoreTest.java
2 parents 007e441 + af51f64 commit eca846d

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
@@ -41,7 +41,7 @@ This assumes that you have already installed the LaunchDarkly Java SDK.
4141

4242
5. When configuring your SDK client, add the DynamoDB feature store:
4343

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

5353
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:
5454

55-
DynamoDbFeatureStoreBuilder store = DatabaseComponents.dynamoDbFeatureStore("my-table-name")
55+
DynamoDbFeatureStoreBuilder store = DynamoDbComponents.dynamoDbFeatureStore("my-table-name")
5656
.existingClient(myDynamoDbClientInstance);
5757

5858
Caching behavior
5959
----------------
6060

6161
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:
6262

63-
DynamoDbFeatureStoreBuilder store = DatabaseComponents.dynamoDbFeatureStore("my-table-name")
63+
DynamoDbFeatureStoreBuilder store = DynamoDbComponents.dynamoDbFeatureStore("my-table-name")
6464
.caching(FeatureStoreCaching.disabled());
6565

6666
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
@@ -17,7 +17,7 @@
1717
/**
1818
* Builder/factory class for the DynamoDB feature store.
1919
* <p>
20-
* Create this builder by calling {@link DatabaseComponents#dynamoDbFeatureStore(String)}, then
20+
* Create this builder by calling {@link DynamoDbComponents#dynamoDbFeatureStore(String)}, then
2121
* optionally modify its properties with builder methods, and then include it in your client
2222
* configuration with {@link LDConfig.Builder#featureStoreFactory(FeatureStoreFactory)}.
2323
* <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
@@ -118,7 +118,7 @@ private void createTableIfNecessary() {
118118
}
119119

120120
private DynamoDbFeatureStoreBuilder baseBuilder() {
121-
return new DynamoDbFeatureStoreBuilder(TABLE_NAME)
121+
return DynamoDbComponents.dynamoDbFeatureStore(TABLE_NAME)
122122
.endpoint(DYNAMODB_ENDPOINT)
123123
.region(Region.US_EAST_1)
124124
.caching(cached ? FeatureStoreCaching.enabled().ttlSeconds(30) : FeatureStoreCaching.disabled())

0 commit comments

Comments
 (0)