Skip to content

Commit 5fd5421

Browse files
authored
Update java docs for v5 release (#607)
1 parent 51b6d75 commit 5fd5421

File tree

3 files changed

+10
-17
lines changed

3 files changed

+10
-17
lines changed

docs/sdks/server-sdks/java/bandits.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ In order for the bandit to learn an optimized policy, we need to capture and log
2121
This requires defining a bandit logger in addition to an assignment logger.
2222

2323
```java
24-
EppoClient.Builder()
25-
.apiKey(apiKey)
24+
EppoClient.builder(sdkKey)
2625
.assignmentLogger(assignmentLogData -> {
2726
System.out.println("TODO: send assignment event data to data warehouse: " + assignmentLogData);
2827
})

docs/sdks/server-sdks/java/initialization.mdx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@ The Eppo Java SDK is easy to initialize while offering robust customization opti
1212
To complete basic initialization, you only need to provide an SDK key. [Create an SDK key](/sdks/sdk-keys) if you don't already have one.
1313

1414
```java
15-
EppoClient.Builder()
16-
.apiKey(apiKey)
15+
EppoClient.builder(sdkKey)
1716
.buildAndInit();
1817
```
1918

2019
<ApiOptionRef
21-
name="apiKey"
20+
name="sdkKey"
2221
type="string"
2322
>
2423
Your SDK key. [Create an SDK key](/sdks/sdk-keys) if you don't already have one.
@@ -94,8 +93,7 @@ Basic initialization is great for most use cases, but the SDK provides options t
9493
Here's an example of using multiple configuration options:
9594

9695
```java
97-
EppoClient.Builder()
98-
.apiKey(apiKey)
96+
EppoClient.builder(sdkKey)
9997
.gracefulMode(true)
10098
.pollingIntervalMs(60000) // Poll every minute
10199
.assignmentLogger(assignmentLogData -> {
@@ -118,5 +116,5 @@ The SDK provides several utility methods that can be useful:
118116
eppoClient.setIsGracefulFailureMode(false);
119117

120118
// Stop polling for configuration updates
121-
EppoClient.stopPolling();
119+
eppoClient.stopPolling();
122120
```

docs/sdks/server-sdks/java/quickstart.mdx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ You can install the SDK using Gradle or Maven:
1616
<TabItem value="gradle" label="Gradle">
1717

1818
```groovy
19-
implementation 'cloud.eppo:eppo-server-sdk:3.5.3'
19+
implementation 'cloud.eppo:eppo-server-sdk:5.0.0'
2020
```
2121

2222
</TabItem>
@@ -26,7 +26,7 @@ implementation 'cloud.eppo:eppo-server-sdk:3.5.3'
2626
<dependency>
2727
<groupId>cloud.eppo</groupId>
2828
<artifactId>eppo-server-sdk</artifactId>
29-
<version>3.0.1</version>
29+
<version>5.0.0</version>
3030
</dependency>
3131
```
3232

@@ -42,9 +42,7 @@ implementation 'cloud.eppo:eppo-server-sdk:3.5.3'
4242
Initialize the SDK with your key:
4343

4444
```java
45-
EppoClient eppoClient = EppoClient.Builder()
46-
.apiKey(sdkKey)
47-
.buildAndInit();
45+
EppoClient eppoClient = EppoClient.builder(sdkKey).buildAndInit();
4846
```
4947

5048
### Assign a variant
@@ -91,8 +89,7 @@ The SDK provides different assignment functions based on the type of value you n
9189
For experiments, you'll need to add an assignment logger (see [`AssignmentLogger`](/sdks/server-sdks/java/assignments#assignment-logger)) when initializing the SDK:
9290

9391
```java
94-
EppoClient.Builder()
95-
.apiKey(apiKey)
92+
EppoClient.builder(sdkKey)
9693
.assignmentLogger(assignmentLogData -> {
9794
// TODO: Send assignment event data to data warehouse
9895
System.out.println(assignmentLogData);
@@ -107,8 +104,7 @@ After that, you can make assignments the same way as with feature flags.
107104
For bandits, you'll need both an [`assignment logger`](/sdks/server-sdks/java/assignments#assignment-logger) and a [`bandit logger`](/sdks/server-sdks/java/bandits#define-a-bandit-assignment-logger):
108105

109106
```java
110-
EppoClient.Builder()
111-
.apiKey(apiKey)
107+
EppoClient.builder(sdkKey)
112108
.assignmentLogger(assignmentLogData -> {
113109
// TODO: Send assignment event data to data warehouse
114110
System.out.println(assignmentLogData);

0 commit comments

Comments
 (0)