He-Pin commented on code in PR #2947:
URL: https://github.com/apache/pekko/pull/2947#discussion_r3212714769
##########
cluster-typed/src/main/scala/org/apache/pekko/cluster/typed/Cluster.scala:
##########
@@ -128,6 +132,30 @@ final case class JoinSeedNodes(seedNodes:
immutable.Seq[Address]) extends Cluste
}
+/**
+ * Scala API: If the `appVersion` is read from an external system (e.g.
Kubernetes) it can be defined after
+ * system startup but before joining by completing the `appVersion` `Future`.
In that case,
+ * `SetAppVersionLater` should be sent before [[Join]] or [[JoinSeedNodes]].
It's fine to send
+ * `Join` or `JoinSeedNodes` immediately afterwards (before the `Future` is
completed). The join will
+ * then wait for the `appVersion` to be completed.
+ */
+final case class SetAppVersionLater(appVersion: Future[Version]) extends
ClusterCommand
+
+object SetAppVersionLater {
+
+ /**
+ * Java API: If the `appVersion` is read from an external system (e.g.
Kubernetes) it can be defined after
+ * system startup but before joining by completing the `appVersion`
`CompletionStage`. In that case,
+ * `SetAppVersionLater` should be sent before [[Join]] or [[JoinSeedNodes]].
It's fine to send
+ * `Join` or `JoinSeedNodes` immediately afterwards (before the
`CompletionStage` is completed). The join will
+ * then wait for the `appVersion` to be completed.
+ */
+ def create(appVersion: CompletionStage[Version]): SetAppVersionLater = {
Review Comment:
Maybe better with _<: Version
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]