-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from aerospike/develop
v1.6.0
- Loading branch information
Showing
57 changed files
with
1,988 additions
and
1,962 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...erospike/jdbc/scan/EventLoopProvider.java → ...rospike/jdbc/async/EventLoopProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/main/java/com/aerospike/jdbc/async/FutureBatchOperateListListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.aerospike.jdbc.async; | ||
|
||
import com.aerospike.client.AerospikeException; | ||
import com.aerospike.client.BatchRecord; | ||
import com.aerospike.client.listener.BatchOperateListListener; | ||
|
||
import java.util.List; | ||
import java.util.Objects; | ||
import java.util.concurrent.CompletableFuture; | ||
import java.util.concurrent.Future; | ||
|
||
public class FutureBatchOperateListListener implements BatchOperateListListener { | ||
|
||
private final CompletableFuture<Integer> totalFuture = new CompletableFuture<>(); | ||
|
||
@Override | ||
public void onSuccess(List<BatchRecord> list, boolean b) { | ||
totalFuture.complete((int) list.stream().filter(Objects::nonNull).count()); | ||
} | ||
|
||
@Override | ||
public void onFailure(AerospikeException e) { | ||
totalFuture.completeExceptionally(e); | ||
} | ||
|
||
public Future<Integer> getTotal() { | ||
return totalFuture; | ||
} | ||
} |
Oops, something went wrong.