-
Notifications
You must be signed in to change notification settings - Fork 5
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
Conversation
* first stab, untested * corresponds to EventSourcedEntitiesImpl, ReflectiveEventSourcedEntityRouter, EventSourcedEntityRouter
There was a problem hiding this 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[_]] ||*/ |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
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] |
There was a problem hiding this comment.
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)
based on: #39
locally all test are green