-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clean up micronaut framework integration
Signed-off-by: Gabriel Harris-Rouquette <[email protected]>
- Loading branch information
Showing
327 changed files
with
1,355 additions
and
22,577 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
graalvm64-17.0.4 | ||
20.0.1 |
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 was deleted.
Oops, something went wrong.
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
7 changes: 7 additions & 0 deletions
7
akka/src/main/java/org/spongepowered/downloads/akka/AkkaSerializable.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 org.spongepowered.downloads.akka; | ||
|
||
/** | ||
* Marker interface for Akka serialization via Jackson | ||
*/ | ||
public interface AkkaSerializable { | ||
} |
26 changes: 26 additions & 0 deletions
26
akka/src/main/java/org/spongepowered/downloads/akka/ProductionAkkaSystem.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,26 @@ | ||
package org.spongepowered.downloads.akka; | ||
|
||
import akka.actor.typed.ActorSystem; | ||
import akka.actor.typed.Behavior; | ||
import akka.actor.typed.SpawnProtocol; | ||
import akka.actor.typed.javadsl.Behaviors; | ||
import akka.management.cluster.bootstrap.ClusterBootstrap; | ||
import akka.management.javadsl.AkkaManagement; | ||
import io.micronaut.context.annotation.Bean; | ||
import io.micronaut.context.annotation.Factory; | ||
import io.micronaut.context.annotation.Requires; | ||
|
||
@Factory | ||
public class ProductionAkkaSystem { | ||
|
||
@Bean | ||
public Behavior<SpawnProtocol.Command> productionGuardian() { | ||
return Behaviors.<SpawnProtocol.Command>setup(ctx -> { | ||
final var system = ctx.getSystem(); | ||
ClusterBootstrap.get(system).start(); | ||
AkkaManagement.get(system).start(); | ||
return SpawnProtocol.create(); | ||
}); | ||
} | ||
|
||
} |
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,23 @@ | ||
|
||
akka { | ||
actor { | ||
provider = "cluster" | ||
serialization-bindings { | ||
"org.spongepowered.downloads.akka.AkkaSerializable" = jackson-json | ||
} | ||
} | ||
remote.artery { | ||
canonical { | ||
hostname = "127.0.0.1" | ||
port = 2551 | ||
} | ||
} | ||
|
||
cluster { | ||
seed-nodes = [ | ||
"akka://[email protected]:2551", | ||
"akka://[email protected]:2552"] | ||
|
||
downing-provider-class = "akka.cluster.sbr.SplitBrainResolverProvider" | ||
} | ||
} |
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,14 @@ | ||
|
||
|
||
|
||
plugins { | ||
id("com.github.johnrengelman.shadow") | ||
id("io.micronaut.library") | ||
} | ||
dependencies { | ||
annotationProcessor("io.micronaut.serde:micronaut-serde-processor") | ||
implementation("io.micronaut.serde:micronaut-serde-jackson") | ||
api("io.micronaut:micronaut-inject") | ||
api(project(":akka")) | ||
api(libs.akka.testkit) | ||
} |
44 changes: 44 additions & 0 deletions
44
akka/testkit/src/main/java/org/spongepowered/downloads/test/akka/AkkaTestExtension.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,44 @@ | ||
package org.spongepowered.downloads.test.akka; | ||
|
||
import akka.actor.testkit.typed.javadsl.ActorTestKit; | ||
import akka.actor.testkit.typed.javadsl.BehaviorTestKit; | ||
import akka.actor.typed.ActorSystem; | ||
import akka.actor.typed.Behavior; | ||
import akka.actor.typed.SpawnProtocol; | ||
import com.typesafe.config.Config; | ||
import com.typesafe.config.ConfigFactory; | ||
import io.micronaut.context.annotation.Bean; | ||
import io.micronaut.context.annotation.Factory; | ||
import io.micronaut.context.annotation.Replaces; | ||
import io.micronaut.core.annotation.NonNull; | ||
import jakarta.inject.Singleton; | ||
|
||
@Factory | ||
public class AkkaTestExtension { | ||
|
||
@Replaces | ||
@Bean | ||
public Behavior<SpawnProtocol.Command> testBehavior() { | ||
return SpawnProtocol.create(); | ||
} | ||
|
||
@Replaces | ||
@Bean | ||
public Config testConfig() { | ||
return ConfigFactory.defaultApplication() | ||
.withFallback(BehaviorTestKit.applicationTestConfig()) | ||
.resolve(); | ||
} | ||
|
||
@Bean(preDestroy = "shutdownTestKit") | ||
public ActorTestKit testKit() { | ||
return ActorTestKit.create(); | ||
} | ||
|
||
@Replaces(bean = ActorSystem.class) | ||
@Singleton | ||
public ActorSystem<?> system(@NonNull ActorTestKit kit) { | ||
return kit.system(); | ||
} | ||
|
||
} |
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,3 @@ | ||
systemofadownload { | ||
clustering = false | ||
} |
46 changes: 0 additions & 46 deletions
46
artifact-api/src/main/java/org/spongepowered/downloads/artifact/api/Artifact.java
This file was deleted.
Oops, something went wrong.
42 changes: 0 additions & 42 deletions
42
artifact-api/src/main/java/org/spongepowered/downloads/artifact/api/ArtifactCollection.java
This file was deleted.
Oops, something went wrong.
66 changes: 0 additions & 66 deletions
66
artifact-api/src/main/java/org/spongepowered/downloads/artifact/api/ArtifactCoordinates.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.