Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: using spi for TimedAction and ESE #45

Merged
merged 10 commits into from
Dec 2, 2024
Merged

Conversation

aludwiko
Copy link
Contributor

based on: #39
locally all test are green

patriknw and others added 7 commits November 25, 2024 15:47
@github-actions github-actions bot added documentation documentation related java-sdk labels Nov 29, 2024
Copy link
Member

@patriknw patriknw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, let's merge, and follow up

@@ -375,7 +421,8 @@ private final class Sdk(
}

val actionAndConsumerServices = services.filter { case (_, service) =>
service.getClass == classOf[TimedActionService[_]] || service.getClass == classOf[ConsumerService[_]]
/*service.getClass == classOf[TimedActionService[_]] ||*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove or FIXME?

componentClass: Class[_],
messageCodec: JsonMessageCodec,
factory: EventSourcedEntityContext => ES,
snapshotEvery: Int)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't used here, passed to runtime via settings instead. I'll follow up in separate PR.


override def emptyState: SpiEventSourcedEntity.State = {
// FIXME rather messy with the contexts here
val context = new EventSourcedEntityContextImpl("FIXME_ID")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll follow up, related to the factory that Renato has proposed.

ScalaPbAny.fromJavaProto(messageCodec.encodeJava(obj))

override def fromProto(pb: ScalaPbAny): Deserialized =
messageCodec.decodeMessage(pb).asInstanceOf[Deserialized]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is incorrect, I'll follow up, see #39 (comment)

samples/shopping-cart-quickstart/pom.xml Outdated Show resolved Hide resolved
@github-actions github-actions bot removed the documentation documentation related label Dec 2, 2024
@aludwiko aludwiko merged commit a374872 into java-spi Dec 2, 2024
22 checks passed
@aludwiko aludwiko deleted the timed-action-spi-sdk branch December 2, 2024 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants