-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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 #10047 from cescoffier/features/update-reactive-me…
…ssaging Update SmallRye Reactive Messaging to version 2.1.0
- Loading branch information
Showing
13 changed files
with
506 additions
and
54 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
23 changes: 23 additions & 0 deletions
23
...ment/src/main/java/io/quarkus/smallrye/reactivemessaging/deployment/BroadcastLiteral.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,23 @@ | ||
package io.quarkus.smallrye.reactivemessaging.deployment; | ||
|
||
import java.lang.annotation.Annotation; | ||
|
||
import io.smallrye.reactive.messaging.annotations.Broadcast; | ||
|
||
public class BroadcastLiteral implements Broadcast { | ||
private final int subscribers; | ||
|
||
public BroadcastLiteral(int subscribers) { | ||
this.subscribers = subscribers; | ||
} | ||
|
||
@Override | ||
public int value() { | ||
return subscribers; | ||
} | ||
|
||
@Override | ||
public Class<? extends Annotation> annotationType() { | ||
return Broadcast.class; | ||
} | ||
} |
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
35 changes: 35 additions & 0 deletions
35
...ent/src/main/java/io/quarkus/smallrye/reactivemessaging/deployment/OnOverflowLiteral.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,35 @@ | ||
package io.quarkus.smallrye.reactivemessaging.deployment; | ||
|
||
import java.lang.annotation.Annotation; | ||
|
||
import org.eclipse.microprofile.reactive.messaging.OnOverflow; | ||
|
||
public class OnOverflowLiteral implements OnOverflow { | ||
|
||
private final Strategy strategy; | ||
private final long buffer; | ||
|
||
OnOverflowLiteral(String strategy, long buffer) { | ||
this.strategy = strategy == null ? Strategy.BUFFER : Strategy.valueOf(strategy.toUpperCase()); | ||
this.buffer = buffer; | ||
} | ||
|
||
public static OnOverflow create(String strategy, long buffer) { | ||
return new OnOverflowLiteral(strategy, buffer); | ||
} | ||
|
||
@Override | ||
public Strategy value() { | ||
return strategy; | ||
} | ||
|
||
@Override | ||
public long bufferSize() { | ||
return buffer; | ||
} | ||
|
||
@Override | ||
public Class<? extends Annotation> annotationType() { | ||
return OnOverflow.class; | ||
} | ||
} |
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
Oops, something went wrong.