Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

pruivo
Copy link
Member

@pruivo pruivo commented Jan 11, 2016

@pruivo pruivo added the Preview label Jan 11, 2016
@pruivo pruivo force-pushed the command_marshall branch 4 times, most recently from 54591f4 to 7b5750d Compare January 14, 2016 14:21
@pruivo pruivo changed the title ISPN-6056 Improve ReplicableCommand marshallinge ISPN-6056 Improve ReplicableCommand marshalling Jan 14, 2016
@pruivo pruivo force-pushed the command_marshall branch 3 times, most recently from 4d8c0f6 to bd276e8 Compare January 18, 2016 15:54
@pruivo pruivo force-pushed the command_marshall branch 2 times, most recently from 6e0888b to 16c64ed Compare January 28, 2016 14:46
if (size == NULL_VALUE) {
return null;
}
final T map = Objects.requireNonNull(builder, "MapBuilder must be non-null").build();
Copy link
Member

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.

@tristantarrant
Copy link
Member

@pruivo one minor comment

@pruivo
Copy link
Member Author

pruivo commented Feb 10, 2016

ready for review again :)

@tristantarrant
Copy link
Member

Pushed, thanks

public void writeTo(ObjectOutput output) throws IOException {
MarshallUtil.marshallString(cacheName, output);
MarshallUtil.marshallEnum(type, output);
switch (type) {
Copy link
Member

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.

@pruivo pruivo deleted the command_marshall branch July 10, 2021 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants