Migrating from 3.3.0 to 3.4.0
In CAUSEWAY-3896 we made a small change to the API for the WrapperFactor's async programming model.
For example:
var counter = bookmarkService.lookup(bookmark, Counter.class).orElseThrow();
var counter = wrapperFactory.asyncWrap(counter) (1)
.applyAsync(Counter::bumpUsingDeclaredAction)
.tryGet(5, TimeUnit.SECONDS) (2)
.valueAsNonNullElseFail();
assertThat(counter.getNum()).isEqualTo(2L);
1 | returns the detached counter entity |
2 | wait max 5 sec to allow executor to complete before continuing |