-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Prepare ClusterTools API to the stable version #2561
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
Conversation
@@ -62,44 +62,44 @@ public static ClusterClientSettings Create(Config config) | |||
/// <summary> | |||
/// Actor paths of the <see cref="ClusterReceptionist"/> actors on the servers (cluster nodes) that the client will try to contact initially. | |||
/// </summary> | |||
public readonly IImmutableSet<ActorPath> InitialContacts; | |||
public IImmutableSet<ActorPath> InitialContacts { get; } |
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.
Should we expose ImmutableList
instead of some ReadOnly abstraction?
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.
Exposing the interface is fine imo.
} | ||
} | ||
|
||
/// <summary> | ||
/// TBD | ||
/// </summary> | ||
[Serializable] | ||
public sealed class GetTopics : IEquatable<GetTopics> |
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.
Why we need an IEquatable
for singletons?
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.
Agreed. Seems unnecessary
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 serializable class. Singleton messages are not guaranteed to be deserialized back into Instance
object. Moreover, usually they are guaranteed to be different objects.
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.
We don't transfer this object via wire. it is local only
public CurrentTopics(string[] topics) { } | ||
public string[] Topics { get; } |
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'm not fan of exposing arrays in public APIs. Could I change it to IReadOnlyCollection ?
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.
In this case I do not think it matters much. Wrapping it in an IReadOnlyCollection in this case only provides an illusion of safety.
Another note that I want to add. Im not a fan of forcing people to define an We could still provide a private copy constructor that does accept the |
@alexvaluyskiy minor merge conflict |
a0d1ab6
to
ca0d3b5
Compare
@Danthar @alexvaluyskiy @Horusiath is this ready for merge? |
@Aaronontheweb ready |
Uh oh!
There was an error while loading. Please reload this page.