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
ISPN-6056 Improve ReplicableCommand marshalling #3928
Conversation
54591f4
to
7b5750d
Compare
4d8c0f6
to
bd276e8
Compare
6e0888b
to
16c64ed
Compare
16c64ed
to
0e2f691
Compare
if (size == NULL_VALUE) { | ||
return null; | ||
} | ||
final T map = Objects.requireNonNull(builder, "MapBuilder must be non-null").build(); |
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.
Since we know the size the map will have, why not enhance the MapBuilder to also support an initial size to avoid resizing while unmarshalling.
@pruivo one minor comment |
0e2f691
to
358de5b
Compare
ready for review again :) |
Pushed, thanks |
public void writeTo(ObjectOutput output) throws IOException { | ||
MarshallUtil.marshallString(cacheName, output); | ||
MarshallUtil.marshallEnum(type, output); | ||
switch (type) { |
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.
Selectively marshalling parameters probably makes sense more for commands that are used more often... for CacheTopologyControlCommand
, I think serializing everything unconditionally would have been just fine.
https://issues.jboss.org/browse/ISPN-6056