Skip to content

Commit fd653d0

Browse files
committed
Made it compile with home grown CompositeFuture
1 parent 1e28b7a commit fd653d0

File tree

5 files changed

+66
-4
lines changed

5 files changed

+66
-4
lines changed

src/main/java/io/engagingspaces/vertx/dataloader/BatchLoader.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616

1717
package io.engagingspaces.vertx.dataloader;
1818

19-
import io.vertx.core.CompositeFuture;
20-
2119
import java.util.Collection;
2220

2321
/**
@@ -35,6 +33,7 @@ public interface BatchLoader<K> {
3533
* Batch load the provided keys and return a composite future of the result.
3634
*
3735
* @param keys the list of keys to load
36+
*
3837
* @return the composite future
3938
*/
4039
CompositeFuture load(Collection<K> keys);
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
package io.engagingspaces.vertx.dataloader;
2+
3+
import java.util.List;
4+
import java.util.function.Consumer;
5+
6+
/**
7+
* TODO: Document this class / interface here
8+
*
9+
* @since v0.x
10+
*/
11+
public class CompositeFuture {
12+
13+
public CompositeFuture setHandler(Consumer<CompositeFuture> handler) {
14+
return this;
15+
}
16+
17+
public boolean succeeded() {
18+
throw new UnsupportedOperationException("Not implemented");
19+
}
20+
21+
public Throwable cause() {
22+
throw new UnsupportedOperationException("Not implemented");
23+
}
24+
25+
public boolean succeeded(int index) {
26+
throw new UnsupportedOperationException("Not implemented");
27+
}
28+
29+
public Throwable cause(int index) {
30+
throw new UnsupportedOperationException("Not implemented");
31+
}
32+
33+
public CompositeFuture result() {
34+
return this;
35+
}
36+
37+
public <V> V resultAt(int index) {
38+
throw new UnsupportedOperationException("Not implemented");
39+
}
40+
41+
public static <T> CompositeFuture join(List<T> objects) {
42+
throw new UnsupportedOperationException("Not implemented");
43+
}
44+
45+
public <T> T list() {
46+
throw new UnsupportedOperationException("Not implemented");
47+
}
48+
49+
public <T> T size() {
50+
throw new UnsupportedOperationException("Not implemented");
51+
}
52+
53+
public boolean isComplete() {
54+
throw new UnsupportedOperationException("Not implemented");
55+
}
56+
}

src/main/java/io/engagingspaces/vertx/dataloader/DataLoader.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package io.engagingspaces.vertx.dataloader;
1818

19-
import io.vertx.core.CompositeFuture;
2019
import io.vertx.core.Future;
2120

2221
import java.util.Collections;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package io.engagingspaces.vertx.dataloader;
2+
3+
/**
4+
* TODO: Document this class / interface here
5+
*
6+
* @since v0.x
7+
*/
8+
public class FutureKit {
9+
}

src/test/java/io/engagingspaces/vertx/dataloader/DataLoaderTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package io.engagingspaces.vertx.dataloader;
1818

19-
import io.vertx.core.CompositeFuture;
2019
import io.vertx.core.Future;
2120
import io.vertx.core.json.JsonObject;
2221
import io.vertx.ext.unit.junit.RunTestOnContext;

0 commit comments

Comments
 (0)