Skip to content

Commit 344e2d3

Browse files
committed
Generate updated javadocs for 1.5.0
Signed-off-by: Artur Souza <[email protected]>
1 parent f0639b5 commit 344e2d3

File tree

627 files changed

+12721
-4950
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

627 files changed

+12721
-4950
lines changed

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,19 @@ For a Maven project, add the following to your `pom.xml` file:
5252
<dependency>
5353
<groupId>io.dapr</groupId>
5454
<artifactId>dapr-sdk</artifactId>
55-
<version>1.4.0</version>
55+
<version>1.5.0</version>
5656
</dependency>
5757
<!-- Dapr's SDK for Actors (optional). -->
5858
<dependency>
5959
<groupId>io.dapr</groupId>
6060
<artifactId>dapr-sdk-actors</artifactId>
61-
<version>1.4.0</version>
61+
<version>1.5.0</version>
6262
</dependency>
6363
<!-- Dapr's SDK integration with SpringBoot (optional). -->
6464
<dependency>
6565
<groupId>io.dapr</groupId>
6666
<artifactId>dapr-sdk-springboot</artifactId>
67-
<version>1.4.0</version>
67+
<version>1.5.0</version>
6868
</dependency>
6969
...
7070
</dependencies>
@@ -78,11 +78,11 @@ For a Gradle project, add the following to your `build.gradle` file:
7878
dependencies {
7979
...
8080
// Dapr's core SDK with all features, except Actors.
81-
compile('io.dapr:dapr-sdk:1.4.0')
81+
compile('io.dapr:dapr-sdk:1.5.0')
8282
// Dapr's SDK for Actors (optional).
83-
compile('io.dapr:dapr-sdk-actors:1.4.0')
83+
compile('io.dapr:dapr-sdk-actors:1.5.0')
8484
// Dapr's SDK integration with SpringBoot (optional).
85-
compile('io.dapr:dapr-sdk-springboot:1.4.0')
85+
compile('io.dapr:dapr-sdk-springboot:1.5.0')
8686
}
8787
```
8888

daprdocs/content/en/java-sdk-docs/_index.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@ For a Maven project, add the following to your `pom.xml` file:
3131
<dependency>
3232
<groupId>io.dapr</groupId>
3333
<artifactId>dapr-sdk</artifactId>
34-
<version>1.4.0</version>
34+
<version>1.5.0</version>
3535
</dependency>
3636
<!-- Dapr's SDK for Actors (optional). -->
3737
<dependency>
3838
<groupId>io.dapr</groupId>
3939
<artifactId>dapr-sdk-actors</artifactId>
40-
<version>1.4.0</version>
40+
<version>1.5.0</version>
4141
</dependency>
4242
<!-- Dapr's SDK integration with SpringBoot (optional). -->
4343
<dependency>
4444
<groupId>io.dapr</groupId>
4545
<artifactId>dapr-sdk-springboot</artifactId>
46-
<version>1.4.0</version>
46+
<version>1.5.0</version>
4747
</dependency>
4848
...
4949
</dependencies>
@@ -57,11 +57,11 @@ For a Gradle project, add the following to your `build.gradle` file:
5757
dependencies {
5858
...
5959
// Dapr's core SDK with all features, except Actors.
60-
compile('io.dapr:dapr-sdk:1.4.0')
60+
compile('io.dapr:dapr-sdk:1.5.0')
6161
// Dapr's SDK for Actors (optional).
62-
compile('io.dapr:dapr-sdk-actors:1.4.0')
62+
compile('io.dapr:dapr-sdk-actors:1.5.0')
6363
// Dapr's SDK integration with SpringBoot (optional).
64-
compile('io.dapr:dapr-sdk-springboot:1.4.0')
64+
compile('io.dapr:dapr-sdk-springboot:1.5.0')
6565
}
6666
```
6767

@@ -72,7 +72,7 @@ You can fix this by specifying a compatible OkHttp version in your project to ma
7272
<dependency>
7373
<groupId>com.squareup.okhttp3</groupId>
7474
<artifactId>okhttp</artifactId>
75-
<version>1.4.0</version>
75+
<version>1.5.0</version>
7676
</dependency>
7777
```
7878

daprdocs/content/en/java-sdk-docs/_index.mdbak

+105-4
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@ For a Maven project, add the following to your `pom.xml` file:
3131
<dependency>
3232
<groupId>io.dapr</groupId>
3333
<artifactId>dapr-sdk</artifactId>
34-
<version>1.4.0</version>
34+
<version>1.5.0</version>
3535
</dependency>
3636
<!-- Dapr's SDK for Actors (optional). -->
3737
<dependency>
3838
<groupId>io.dapr</groupId>
3939
<artifactId>dapr-sdk-actors</artifactId>
40-
<version>1.4.0</version>
40+
<version>1.5.0</version>
4141
</dependency>
4242
<!-- Dapr's SDK integration with SpringBoot (optional). -->
4343
<dependency>
4444
<groupId>io.dapr</groupId>
4545
<artifactId>dapr-sdk-springboot</artifactId>
46-
<version>1.4.0</version>
46+
<version>1.5.0</version>
4747
</dependency>
4848
...
4949
</dependencies>
@@ -72,7 +72,7 @@ You can fix this by specifying a compatible OkHttp version in your project to ma
7272
<dependency>
7373
<groupId>com.squareup.okhttp3</groupId>
7474
<artifactId>okhttp</artifactId>
75-
<version>1.4.0</version>
75+
<version>1.5.0</version>
7676
</dependency>
7777
```
7878

@@ -239,5 +239,106 @@ public interface DemoActor {
239239
- For a full guide on actors visit [How-To: Use virtual actors in Dapr]({{< ref howto-actors.md >}}).
240240
- Visit [Java SDK examples](https://github.com/dapr/java-sdk/tree/master/examples/src/main/java/io/dapr/examples/actors) for code samples and instructions to try actors
241241

242+
### Get & Subscribe to application configurations
243+
244+
> Note this is a preview API and thus will only be accessible via the DaprPreviewClient interface and not the normal DaprClient interface
245+
246+
```java
247+
import io.dapr.client.DaprClientBuilder;
248+
import io.dapr.client.DaprPreviewClient;
249+
import io.dapr.client.domain.ConfigurationItem;
250+
import io.dapr.client.domain.GetConfigurationRequest;
251+
import io.dapr.client.domain.SubscribeConfigurationRequest;
252+
import reactor.core.publisher.Flux;
253+
import reactor.core.publisher.Mono;
254+
255+
try (DaprPreviewClient client = (new DaprClientBuilder()).buildPreviewClient()) {
256+
// Get configuration for a single key
257+
Mono<ConfigurationItem> item = client.getConfiguration(CONFIG_STORE_NAME, CONFIG_KEY).block();
258+
259+
// Get Configurations for multiple keys
260+
Mono<List<ConfigurationItem>> items =
261+
client.getConfiguration(CONFIG_STORE_NAME, CONFIG_KEY_1, CONFIG_KEY_2);
262+
263+
// Susbcribe to Confifuration changes
264+
Flux<List<ConfigurationItem>> outFlux = client.subscribeToConfiguration(CONFIG_STORE_NAME, CONFIG_KEY_1, CONFIG_KEY_2);
265+
outFlux.subscribe(configItems -> configItems.forEach(...));
266+
}
267+
```
268+
269+
- For a full list of configuration operations visit [How-To: Manage configuration from a store]({{< ref howto-manage-configuration.md >}}).
270+
- Visit [Java SDK examples](https://github.com/dapr/java-sdk/tree/master/examples/src/main/java/io/dapr/examples/configuration) for code samples and instructions to try out different configuration operations.
271+
272+
### Query saved state
273+
274+
> Note this is a preview API and thus will only be accessible via the DaprPreviewClient interface and not the normal DaprClient interface
275+
276+
```java
277+
import io.dapr.client.DaprClient;
278+
import io.dapr.client.DaprClientBuilder;
279+
import io.dapr.client.DaprPreviewClient;
280+
import io.dapr.client.domain.QueryStateItem;
281+
import io.dapr.client.domain.QueryStateRequest;
282+
import io.dapr.client.domain.QueryStateResponse;
283+
import io.dapr.client.domain.query.Query;
284+
import io.dapr.client.domain.query.Sorting;
285+
import io.dapr.client.domain.query.filters.EqFilter;
286+
287+
try (DaprClient client = builder.build(); DaprPreviewClient previewClient = builder.buildPreviewClient()) {
288+
String searchVal = args.length == 0 ? "searchValue" : args[0];
289+
290+
// Create JSON data
291+
Listing first = new Listing();
292+
first.setPropertyType("apartment");
293+
first.setId("1000");
294+
...
295+
Listing second = new Listing();
296+
second.setPropertyType("row-house");
297+
second.setId("1002");
298+
...
299+
Listing third = new Listing();
300+
third.setPropertyType("apartment");
301+
third.setId("1003");
302+
...
303+
Listing fourth = new Listing();
304+
fourth.setPropertyType("apartment");
305+
fourth.setId("1001");
306+
...
307+
Map<String, String> meta = new HashMap<>();
308+
meta.put("contentType", "application/json");
309+
310+
// Save state
311+
SaveStateRequest request = new SaveStateRequest(STATE_STORE_NAME).setStates(
312+
new State<>("1", first, null, meta, null),
313+
new State<>("2", second, null, meta, null),
314+
new State<>("3", third, null, meta, null),
315+
new State<>("4", fourth, null, meta, null)
316+
);
317+
client.saveBulkState(request).block();
318+
319+
320+
// Create query and query state request
321+
322+
Query query = new Query()
323+
.setFilter(new EqFilter<>("propertyType", "apartment"))
324+
.setSort(Arrays.asList(new Sorting("id", Sorting.Order.DESC)));
325+
QueryStateRequest request = new QueryStateRequest(STATE_STORE_NAME)
326+
.setQuery(query);
327+
328+
// Use preview client to call query state API
329+
QueryStateResponse<MyData> result = previewClient.queryState(request, MyData.class).block();
330+
331+
// View Query state response
332+
System.out.println("Found " + result.getResults().size() + " items.");
333+
for (QueryStateItem<Listing> item : result.getResults()) {
334+
System.out.println("Key: " + item.getKey());
335+
System.out.println("Data: " + item.getValue());
336+
}
337+
}
338+
339+
```
340+
- For a full list of configuration operations visit [How-To: Query state]({{< ref howto-state-query-api.md >}}).
341+
- Visit [Java SDK examples](https://github.com/dapr/java-sdk/tree/master/examples/src/main/java/io/dapr/examples/querystate) for complete code sample.
342+
242343
## Related links
243344
- [Java SDK examples](https://github.com/dapr/java-sdk/tree/master/examples/src/main/java/io/dapr/examples)

0 commit comments

Comments
 (0)