Skip to content

Conversation

@frsyuki
Copy link
Member

@frsyuki frsyuki commented Jan 6, 2016

  • This change allows applications to use method-chain syntax to create packer and unpacker with config. For example,
MessageUnpacker unpacker = new UnpackerConfig()
    .withStringDecoderBufferSize(16 * 1024)
    .withActionOnMalformedString(CodingErrorAction.REPORT)
    .withActionOnUnmappableString(CodingErrorAction.REPORT)
    .newUnpacker(packedData);
  • This change makes {Packer,Unpacker}Config immutable. This makes it safe to share a config object.
  • This change makes buffer size of InputStreamBufferInput, OutputStreamBufferOutput, and ChannelBuffer{Input,Output} configurable. Configurable buffer size is better because it is trade-off of performance and memory consumption.

Copy link
Member

Choose a reason for hiding this comment

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

Please add a test code to check the equality of config objects

Copy link
Member Author

Choose a reason for hiding this comment

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

added

xerial added a commit that referenced this pull request Jan 7, 2016
Support method-chain syntax to create packer and unpacker with immutable config
@xerial xerial merged commit 71a27f5 into develop Jan 7, 2016
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