Skip to content

Commit 894021f

Browse files
committed
Generate updated javadocs for 1.8.0
Signed-off-by: Artur Souza <[email protected]>
1 parent 5542b47 commit 894021f

File tree

849 files changed

+401851
-154988
lines changed

Some content is hidden

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

849 files changed

+401851
-154988
lines changed

README.md

Lines changed: 6 additions & 6 deletions
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.7.1</version>
55+
<version>1.8.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.7.1</version>
61+
<version>1.8.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.7.1</version>
67+
<version>1.8.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.7.1')
81+
compile('io.dapr:dapr-sdk:1.8.0')
8282
// Dapr's SDK for Actors (optional).
83-
compile('io.dapr:dapr-sdk-actors:1.7.1')
83+
compile('io.dapr:dapr-sdk-actors:1.8.0')
8484
// Dapr's SDK integration with SpringBoot (optional).
85-
compile('io.dapr:dapr-sdk-springboot:1.7.1')
85+
compile('io.dapr:dapr-sdk-springboot:1.8.0')
8686
}
8787
```
8888

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

Lines changed: 7 additions & 7 deletions
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.7.1</version>
34+
<version>1.8.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.7.1</version>
40+
<version>1.8.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.7.1</version>
46+
<version>1.8.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.7.1')
60+
compile('io.dapr:dapr-sdk:1.8.0')
6161
// Dapr's SDK for Actors (optional).
62-
compile('io.dapr:dapr-sdk-actors:1.7.1')
62+
compile('io.dapr:dapr-sdk-actors:1.8.0')
6363
// Dapr's SDK integration with SpringBoot (optional).
64-
compile('io.dapr:dapr-sdk-springboot:1.7.1')
64+
compile('io.dapr:dapr-sdk-springboot:1.8.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>4.9.0</version>
75+
<version>1.8.0</version>
7676
</dependency>
7777
```
7878

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

Lines changed: 76 additions & 11 deletions
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.7.1</version>
34+
<version>1.8.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.7.1</version>
40+
<version>1.8.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.7.1</version>
46+
<version>1.8.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.7.0')
60+
compile('io.dapr:dapr-sdk:1.7.1')
6161
// Dapr's SDK for Actors (optional).
62-
compile('io.dapr:dapr-sdk-actors:1.7.0')
62+
compile('io.dapr:dapr-sdk-actors:1.7.1')
6363
// Dapr's SDK integration with SpringBoot (optional).
64-
compile('io.dapr:dapr-sdk-springboot:1.7.0')
64+
compile('io.dapr:dapr-sdk-springboot:1.7.1')
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.7.1</version>
75+
<version>1.8.0</version>
7676
</dependency>
7777
```
7878

@@ -148,7 +148,13 @@ try (DaprClient client = (new DaprClientBuilder()).build()) {
148148
```java
149149
import com.fasterxml.jackson.databind.ObjectMapper;
150150
import io.dapr.Topic;
151+
import io.dapr.client.domain.BulkSubscribeAppResponse;
152+
import io.dapr.client.domain.BulkSubscribeAppResponseEntry;
153+
import io.dapr.client.domain.BulkSubscribeAppResponseStatus;
154+
import io.dapr.client.domain.BulkSubscribeMessage;
155+
import io.dapr.client.domain.BulkSubscribeMessageEntry;
151156
import io.dapr.client.domain.CloudEvent;
157+
import io.dapr.springboot.annotations.BulkSubscribe;
152158
import org.springframework.web.bind.annotation.PostMapping;
153159
import org.springframework.web.bind.annotation.RequestBody;
154160
import org.springframework.web.bind.annotation.RestController;
@@ -186,6 +192,62 @@ public class SubscriberController {
186192
});
187193
}
188194

195+
@BulkSubscribe()
196+
@Topic(name = "testingtopicbulk", pubsubName = "${myAppProperty:messagebus}")
197+
@PostMapping(path = "/testingtopicbulk")
198+
public Mono<BulkSubscribeAppResponse> handleBulkMessage(
199+
@RequestBody(required = false) BulkSubscribeMessage<CloudEvent<String>> bulkMessage) {
200+
return Mono.fromCallable(() -> {
201+
if (bulkMessage.getEntries().size() == 0) {
202+
return new BulkSubscribeAppResponse(new ArrayList<BulkSubscribeAppResponseEntry>());
203+
}
204+
205+
System.out.println("Bulk Subscriber received " + bulkMessage.getEntries().size() + " messages.");
206+
207+
List<BulkSubscribeAppResponseEntry> entries = new ArrayList<BulkSubscribeAppResponseEntry>();
208+
for (BulkSubscribeMessageEntry<?> entry : bulkMessage.getEntries()) {
209+
try {
210+
System.out.printf("Bulk Subscriber message has entry ID: %s\n", entry.getEntryId());
211+
CloudEvent<?> cloudEvent = (CloudEvent<?>) entry.getEvent();
212+
System.out.printf("Bulk Subscriber got: %s\n", cloudEvent.getData());
213+
entries.add(new BulkSubscribeAppResponseEntry(entry.getEntryId(), BulkSubscribeAppResponseStatus.SUCCESS));
214+
} catch (Exception e) {
215+
e.printStackTrace();
216+
entries.add(new BulkSubscribeAppResponseEntry(entry.getEntryId(), BulkSubscribeAppResponseStatus.RETRY));
217+
}
218+
}
219+
return new BulkSubscribeAppResponse(entries);
220+
});
221+
}
222+
}
223+
```
224+
225+
##### Bulk Publish Messages
226+
> Note: API is in Alpha stage
227+
228+
229+
```java
230+
import io.dapr.client.DaprClientBuilder;
231+
import io.dapr.client.DaprPreviewClient;
232+
import io.dapr.client.domain.BulkPublishResponse;
233+
import io.dapr.client.domain.BulkPublishResponseFailedEntry;
234+
import java.util.ArrayList;
235+
import java.util.List;
236+
class Solution {
237+
public void publishMessages() {
238+
try (DaprPreviewClient client = (new DaprClientBuilder()).buildPreviewClient()) {
239+
// Create a list of messages to publish
240+
List<String> messages = new ArrayList<>();
241+
for (int i = 0; i < NUM_MESSAGES; i++) {
242+
String message = String.format("This is message #%d", i);
243+
messages.add(message);
244+
System.out.println("Going to publish message : " + message);
245+
}
246+
247+
// Publish list of messages using the bulk publish API
248+
BulkPublishResponse<String> res = client.publishEvents(PUBSUB_NAME, TOPIC_NAME, "text/plain", messages).block()
249+
}
250+
}
189251
}
190252
```
191253

@@ -292,13 +354,16 @@ try (DaprPreviewClient client = (new DaprClientBuilder()).buildPreviewClient())
292354
// Get configuration for a single key
293355
Mono<ConfigurationItem> item = client.getConfiguration(CONFIG_STORE_NAME, CONFIG_KEY).block();
294356

295-
// Get Configurations for multiple keys
296-
Mono<List<ConfigurationItem>> items =
357+
// Get configurations for multiple keys
358+
Mono<Map<String, ConfigurationItem>> items =
297359
client.getConfiguration(CONFIG_STORE_NAME, CONFIG_KEY_1, CONFIG_KEY_2);
298360

299-
// Susbcribe to Confifuration changes
300-
Flux<List<ConfigurationItem>> outFlux = client.subscribeToConfiguration(CONFIG_STORE_NAME, CONFIG_KEY_1, CONFIG_KEY_2);
361+
// Subscribe to configuration changes
362+
Flux<SubscribeConfigurationResponse> outFlux = client.subscribeConfiguration(CONFIG_STORE_NAME, CONFIG_KEY_1, CONFIG_KEY_2);
301363
outFlux.subscribe(configItems -> configItems.forEach(...));
364+
365+
// Unsubscribe from configuration changes
366+
Mono<UnsubscribeConfigurationResponse> unsubscribe = client.unsubscribeConfiguration(SUBSCRIPTION_ID, CONFIG_STORE_NAME)
302367
}
303368
```
304369

0 commit comments

Comments
 (0)