-
-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
♻️ Refactor change stream to use mongo sync driver now possible thank…
…s to virtual threads
- Loading branch information
Showing
30 changed files
with
482 additions
and
791 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
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
49 changes: 0 additions & 49 deletions
49
mongoclient/src/main/java/org/restheart/mongodb/MongoReactiveClientProvider.java
This file was deleted.
Oops, something went wrong.
160 changes: 0 additions & 160 deletions
160
mongoclient/src/main/java/org/restheart/mongodb/MongoReactiveClientSingleton.java
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,30 +27,26 @@ | |
import org.restheart.plugins.RegisterPlugin; | ||
|
||
import com.google.common.annotations.VisibleForTesting; | ||
import com.mongodb.client.MongoClient; | ||
|
||
/** | ||
* | ||
* @author Andrea Di Cesare {@literal <[email protected]>} | ||
*/ | ||
@RegisterPlugin(name = "mongoClients", | ||
description = "helper singleton that holds the MongoClients", | ||
description = "helper singleton that holds the MongoClient", | ||
initPoint = InitPoint.BEFORE_STARTUP, | ||
priority = -10) | ||
public class RHMongoClients implements Initializer { | ||
|
||
@Inject("mclient") | ||
private com.mongodb.client.MongoClient mclient; | ||
private MongoClient mclient; | ||
|
||
@Inject("mclient-reactive") | ||
private com.mongodb.reactivestreams.client.MongoClient mclientReactive; | ||
|
||
private static com.mongodb.client.MongoClient MC_HOLDER; | ||
private static com.mongodb.reactivestreams.client.MongoClient MCR_HOLDER; | ||
private static MongoClient MC_HOLDER; | ||
|
||
@OnInit | ||
public void onInit() { | ||
MC_HOLDER = mclient; | ||
MCR_HOLDER = mclientReactive; | ||
} | ||
|
||
@Override | ||
|
@@ -61,13 +57,8 @@ public static com.mongodb.client.MongoClient mclient() { | |
return MC_HOLDER; | ||
} | ||
|
||
public static com.mongodb.reactivestreams.client.MongoClient mclientReactive() { | ||
return MCR_HOLDER; | ||
} | ||
|
||
@VisibleForTesting | ||
public static void setClients(com.mongodb.client.MongoClient mclient, com.mongodb.reactivestreams.client.MongoClient mclientReactive) { | ||
public static void setClients(MongoClient mclient) { | ||
MC_HOLDER = mclient; | ||
MCR_HOLDER = mclientReactive; | ||
} | ||
} |
Oops, something went wrong.