Skip to content
This repository was archived by the owner on Nov 1, 2024. It is now read-only.

Commit 4d4b9c1

Browse files
authored
Merge pull request #10 from lightbend/prepare-release
Preparing for release
2 parents 98c3271 + 16f7a05 commit 4d4b9c1

File tree

11 files changed

+631
-481
lines changed

11 files changed

+631
-481
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: java
22

3-
before_install:
4-
- bin/buildDeps.sh
3+
#before_install:
4+
# - bin/buildDeps.sh
55

66
cache:
77
directories:

akka/src/main/java/com/lightbend/microprofile/reactive/streams/akka/AkkaEngine.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,14 @@ else if (stage.hasOutlet()) {
165165
throw new IllegalStateException("Graph did not have terminal stage");
166166
}
167167

168+
// For efficient mapping of stages to translators to Akka streams, we use these maps.
168169
private final Map<Class<? extends Stage>, Function<Stage, Source>> sourceStages = new HashMap<>();
169170
private final Map<Class<? extends Stage>, BiFunction<Flow, Stage, Flow>> flowStages = new HashMap<>();
170171
private final Map<Class<? extends Stage>, Function<Stage, Sink>> sinkStages = new HashMap<>();
171172

173+
// These helper functions primarily exist to avoid casting, since the type of S is inferred by the
174+
// compiler using the class passed as the first parameter, the lambda passed as the second parameter
175+
// allows the stage to be handled as that class.
172176
private <S extends Stage> void addSourceStage(Class<S> stageClass, Function<S, Source> factory) {
173177
sourceStages.put(stageClass, (Function) factory);
174178
}
@@ -181,6 +185,7 @@ private <S extends Stage> void addSinkStage(Class<S> stageClass, Function<S, Sin
181185
sinkStages.put(stageClass, (Function) factory);
182186
}
183187

188+
// Initializer
184189
{
185190
// Sources
186191
addSourceStage(Stage.Of.class, stage -> {

akka/src/main/java/com/lightbend/microprofile/reactive/streams/akka/AkkaEngineProvider.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,17 @@
3838
*/
3939
public class AkkaEngineProvider implements ReactiveStreamsEngine {
4040

41+
/**
42+
* This comes from Guava. If we move to JDK9 as a minimum required version, then this can be replaced with the JDK9
43+
* cleaner API.
44+
*/
4145
private static final FinalizableReferenceQueue frq = new FinalizableReferenceQueue();
46+
47+
/**
48+
* We need to hold references to any FinalizablePhantomReference objects that we create, to ensure that they
49+
* themselves don't get garbage collected. Ignore any IDE warnings that say that this set is updated but never
50+
* queried, the garbage collector queries it and that's all that matters.
51+
*/
4252
private static final Set<Reference<?>> references = Sets.newConcurrentHashSet();
4353

4454
private static volatile WeakReference<AkkaEngine> cachedEngine = null;

pom.xml

Lines changed: 76 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
<packaging>pom</packaging>
1414
<name>Lightbend MicroProfile Reactive Streams Operators</name>
1515
<description>Lightbend MicroProfile Reactive Streams Operators :: Parent POM</description>
16-
<url>https://github.com/lightbend/lightbend-microprofile-streams</url>
16+
<url>https://github.com/lightbend/lightbend-microprofile-reactive-streams</url>
1717

1818
<properties>
1919
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2020
<maven.compiler.source>1.8</maven.compiler.source>
2121
<maven.compiler.target>1.8</maven.compiler.target>
2222

23-
<microprofile.reactive.streams.version>1.0-SNAPSHOT</microprofile.reactive.streams.version>
23+
<microprofile.reactive.streams.version>1.0-M1</microprofile.reactive.streams.version>
2424
<akka.version>2.5.14</akka.version>
2525
</properties>
2626

@@ -104,6 +104,20 @@
104104
</dependencies>
105105
</dependencyManagement>
106106

107+
<distributionManagement>
108+
<repository>
109+
<id>ossrh</id>
110+
<name>Sonatype OSSRH - Release Staging Area</name>
111+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
112+
</repository>
113+
<snapshotRepository>
114+
<id>ossrh</id>
115+
<name>Sonatype OSSRH Snapshots</name>
116+
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
117+
<uniqueVersion>true</uniqueVersion>
118+
</snapshotRepository>
119+
</distributionManagement>
120+
107121
<build>
108122
<pluginManagement>
109123
<plugins>
@@ -122,11 +136,71 @@
122136
<artifactId>maven-javadoc-plugin</artifactId>
123137
<version>2.10.4</version>
124138
</plugin>
139+
<plugin>
140+
<groupId>org.apache.maven.plugins</groupId>
141+
<artifactId>maven-release-plugin</artifactId>
142+
<version>2.5.3</version>
143+
</plugin>
125144
</plugins>
126145
</pluginManagement>
127146
</build>
128147

129148
<profiles>
149+
<profile>
150+
<id>release</id>
151+
<build>
152+
<plugins>
153+
<plugin>
154+
<groupId>org.sonatype.plugins</groupId>
155+
<artifactId>nexus-staging-maven-plugin</artifactId>
156+
<version>1.6.3</version>
157+
<extensions>true</extensions>
158+
<configuration>
159+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
160+
<serverId>ossrh</serverId>
161+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
162+
</configuration>
163+
</plugin>
164+
<plugin>
165+
<groupId>org.apache.maven.plugins</groupId>
166+
<artifactId>maven-source-plugin</artifactId>
167+
<executions>
168+
<execution>
169+
<id>attach-sources</id>
170+
<goals>
171+
<goal>jar-no-fork</goal>
172+
</goals>
173+
</execution>
174+
</executions>
175+
</plugin>
176+
<plugin>
177+
<groupId>org.apache.maven.plugins</groupId>
178+
<artifactId>maven-javadoc-plugin</artifactId>
179+
<executions>
180+
<execution>
181+
<id>attach-javadocs</id>
182+
<goals>
183+
<goal>jar</goal>
184+
</goals>
185+
</execution>
186+
</executions>
187+
</plugin>
188+
<plugin>
189+
<groupId>org.apache.maven.plugins</groupId>
190+
<artifactId>maven-gpg-plugin</artifactId>
191+
<executions>
192+
<execution>
193+
<id>sign-artifacts</id>
194+
<phase>verify</phase>
195+
<goals>
196+
<goal>sign</goal>
197+
</goals>
198+
</execution>
199+
</executions>
200+
</plugin>
201+
</plugins>
202+
</build>
203+
</profile>
130204
<profile>
131205
<!-- This allows custom deployments to arbitrary repositories,
132206
these properties are probably best set with profiles in

0 commit comments

Comments
 (0)