-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow ot use a different UpdateExecutor for MongoDB to avoid having a tx
- Loading branch information
1 parent
5ea2ff5
commit 3b1122a
Showing
8 changed files
with
64 additions
and
29 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
7 changes: 5 additions & 2 deletions
7
...he/runtime/jta/TransactionalExecutor.java → ...time/jta/TransactionalUpdateExecutor.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
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
16 changes: 16 additions & 0 deletions
16
...untime/src/main/java/io/quarkus/mongodb/rest/data/panache/runtime/NoopUpdateExecutor.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,16 @@ | ||
package io.quarkus.mongodb.rest.data.panache.runtime; | ||
|
||
import java.util.function.Supplier; | ||
|
||
import javax.inject.Singleton; | ||
|
||
import io.quarkus.rest.data.panache.runtime.UpdateExecutor; | ||
|
||
@Singleton | ||
public class NoopUpdateExecutor implements UpdateExecutor { | ||
|
||
@Override | ||
public <T> T execute(Supplier<T> supplier) { | ||
return supplier.get(); | ||
} | ||
} |
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
7 changes: 7 additions & 0 deletions
7
...ta-panache/runtime/src/main/java/io/quarkus/rest/data/panache/runtime/UpdateExecutor.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,7 @@ | ||
package io.quarkus.rest.data.panache.runtime; | ||
|
||
import java.util.function.Supplier; | ||
|
||
public interface UpdateExecutor { | ||
<T> T execute(Supplier<T> supplier); | ||
} |