[ENT-1774] FlowAsyncOperation deduplication ID (#4068)

This commit is contained in:
Thomas Schroeter
2018-10-19 11:40:59 +01:00
committed by GitHub
parent e99fa975f7
commit f685df46b5
10 changed files with 73 additions and 13 deletions

View File

@ -12,7 +12,7 @@ public final class SummingOperation implements FlowAsyncOperation<Integer> {
@NotNull
@Override
public CordaFuture<Integer> execute() {
public CordaFuture<Integer> execute(String deduplicationId) {
return CordaFutureImplKt.doneFuture(this.a + this.b);
}

View File

@ -11,7 +11,7 @@ public final class SummingOperationThrowing implements FlowAsyncOperation<Intege
@NotNull
@Override
public CordaFuture<Integer> execute() {
public CordaFuture<Integer> execute(String deduplicationId) {
throw new IllegalStateException("You shouldn't be calling me");
}

View File

@ -11,7 +11,7 @@ import net.corda.core.internal.executeAsync
// DOCSTART SummingOperation
class SummingOperation(val a: Int, val b: Int) : FlowAsyncOperation<Int> {
override fun execute(): CordaFuture<Int> {
override fun execute(deduplicationId: String): CordaFuture<Int> {
return doneFuture(a + b)
}
}
@ -19,7 +19,7 @@ class SummingOperation(val a: Int, val b: Int) : FlowAsyncOperation<Int> {
// DOCSTART SummingOperationThrowing
class SummingOperationThrowing(val a: Int, val b: Int) : FlowAsyncOperation<Int> {
override fun execute(): CordaFuture<Int> {
override fun execute(deduplicationId: String): CordaFuture<Int> {
throw IllegalStateException("You shouldn't be calling me")
}
}