-
Notifications
You must be signed in to change notification settings - Fork 5
Add pure Kotlin EventSourcedEntityFactory, EntityHandler and ResolvedEntityFactory implementations #26
Conversation
@vkorenev do you want to take a look at this PR? I find it interesting to merge this before your PR to facilitate the merge |
/** Mark annotation for all CloudState annotations */ | ||
@Target(ElementType.ANNOTATION_TYPE) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
public @interface CloudStateAnnotation {} |
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 annotation does not seem to be used anywhere.
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 removed the annotation for EventSourced support but I will keep the original annotation from the java support package for CRDT
if (other.additionalDescriptors == null) return false | ||
if (!additionalDescriptors.contentEquals(other.additionalDescriptors)) return false | ||
} else if (other.additionalDescriptors != null) return false | ||
if (!additionalDescriptors.contentEquals(other.additionalDescriptors)) return false |
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.
How's about using a List of FileDescriptors instead of Array? Then it should be possible to use equals
and hashCode
generated by Kotlin.
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.
Good. because I chose to expose the registration api in a similar way to java api. But I will change
import scala.collection.immutable.Map | ||
import java.util.* | ||
|
||
class KotlinAnnotationBasedCrdt( |
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 class does not seem to be used anywhere.
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 initial implementation of CRDT support
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
Thanks @vkorenev |
It partially solves the issue #6 and allows new handlers to be created in the future without depending on the Scala handlers.
Eliminates the need for Bytebuddy for EventSourced entities