diff options
author | tkogut <tomasz.kogut@nokia.com> | 2020-12-02 11:53:06 +0100 |
---|---|---|
committer | tkogut <tomasz.kogut@nokia.com> | 2020-12-02 12:54:15 +0100 |
commit | 8ad1127f32d03c25a1d0936638e3bd046a5ef6df (patch) | |
tree | 3b129afacf2fbbd775e4efd40d8d2b162b0287ab /datafile-app-server/src/main/java | |
parent | e9d10ba113a9f540d3e3c29177b27dd561f77869 (diff) |
Upgrade Reactor and SpringBoot1.5.0
Issue-ID: DCAEGEN2-2537
Signed-off-by: tkogut <tomasz.kogut@nokia.com>
Change-Id: Ide560554f11d01737b351d6138430efe6005791d
Diffstat (limited to 'datafile-app-server/src/main/java')
2 files changed, 4 insertions, 2 deletions
diff --git a/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/tasks/DataRouterPublisher.java b/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/tasks/DataRouterPublisher.java index 8b86440a..c24c6c96 100644 --- a/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/tasks/DataRouterPublisher.java +++ b/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/tasks/DataRouterPublisher.java @@ -50,6 +50,7 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.web.util.DefaultUriBuilderFactory; import reactor.core.publisher.Mono; +import reactor.util.retry.Retry; /** * Publishes a file to the DataRouter. @@ -85,7 +86,7 @@ public class DataRouterPublisher { .cache() // .flatMap(this::publishFile) // .flatMap(httpStatus -> handleHttpResponse(httpStatus, publishInfo)) // - .retryBackoff(numRetries, firstBackoff); + .retryWhen(Retry.backoff(numRetries,firstBackoff)); } private Mono<HttpStatus> publishFile(FilePublishInformation publishInfo) { diff --git a/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/tasks/FileCollector.java b/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/tasks/FileCollector.java index b151b042..4b89f169 100644 --- a/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/tasks/FileCollector.java +++ b/datafile-app-server/src/main/java/org/onap/dcaegen2/collectors/datafile/tasks/FileCollector.java @@ -40,6 +40,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.slf4j.MDC; import reactor.core.publisher.Mono; +import reactor.util.retry.Retry; /** * Collects a file from a PNF. @@ -79,7 +80,7 @@ public class FileCollector { return Mono.just(fileData) // .cache() // .flatMap(fd -> tryCollectFile(fileData, contextMap)) // - .retryBackoff(numRetries, firstBackoff) // + .retryWhen(Retry.backoff(numRetries,firstBackoff)) .flatMap(FileCollector::checkCollectedFile); } |