Skip to content

Move Service and ComponentOptions to impl.#414

Merged
RayRoestenburg merged 1 commit intomainfrom
value_entity_scalasdk
Sep 20, 2021
Merged

Move Service and ComponentOptions to impl.#414
RayRoestenburg merged 1 commit intomainfrom
value_entity_scalasdk

Conversation

@RayRoestenburg
Copy link
Copy Markdown
Contributor

No description provided.

package com.akkaserverless.scalasdk

//FIXME see if needed
//FIXME see if needed, maybe should be moved to impl
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if it is moved to impl we should (also) include withForwardHeaders and forwardHeaders in the more concrete options interfaces, such as EventSourcedEntityOptions

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes will do

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These interfaces still extend ComponentOptions in impl, so should be good?

@RayRoestenburg RayRoestenburg force-pushed the value_entity_scalasdk branch 4 times, most recently from 03ea38e to 4ba0285 Compare September 20, 2021 09:34
@RayRoestenburg RayRoestenburg marked this pull request as ready for review September 20, 2021 10:02
@RayRoestenburg
Copy link
Copy Markdown
Contributor Author

Ok with this @patriknw ?

* the headers requested to be forwarded as metadata (cannot be mutated, use withForwardHeaders)
*/
Set<String> forwardHeaders();
def forwardHeaders(): Set[String]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would be more explicit with that Set type. I see that there is an import java.util.Set above but I'd rather have the full package here, or rename the import to JSet.

import com.akkaserverless.javasdk.impl.eventsourcedentity.EventSourcedEntityOptionsImpl

import java.util.Collections;
import java.util.Set;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

some semicolon leftovers

return new EventSourcedEntityOptionsImpl(
0, PassivationStrategy.defaultTimeout(), Collections.emptySet());
}
def withForwardHeaders(headers: Set[String]): ComponentOptions
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

^ regarding Set

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is public api and it's somewhat hidden (strange) to only have it via impl. We should add override in all that extends ComponentOptions, for example ActionOptions

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ok

@RayRoestenburg RayRoestenburg force-pushed the value_entity_scalasdk branch 2 times, most recently from 76a6ea2 to 970ce0a Compare September 20, 2021 11:57
Copy link
Copy Markdown
Contributor

@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

@RayRoestenburg RayRoestenburg merged commit fa88ede into main Sep 20, 2021
@RayRoestenburg RayRoestenburg deleted the value_entity_scalasdk branch September 20, 2021 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants