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

Update documentation and removed unneeded resource consumption #364

Merged
merged 1 commit into from
Jan 21, 2024
Merged

Update documentation and removed unneeded resource consumption #364

merged 1 commit into from
Jan 21, 2024

Conversation

masesdevelopers
Copy link
Contributor

Description

  • Requests on properties of KNetKeyValue, KNetTimestampedKeyValue, KNetTimestampedWindowedKeyValue, KNetWindowedKeyValue produces results can be cached to avoid unneeded consumption of resources: data managed from the classes are immutable so does not change in their lifetime.

  • Updated documentation of KNet Streams SDK.

Related Issue

fix #327

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@masesdevelopers masesdevelopers added documentation Improvements or additions to documentation enhancement New feature or request KNet KNet related issue .NET Pull requests that update .net code labels Jan 21, 2024
@masesdevelopers masesdevelopers self-assigned this Jan 21, 2024
@masesdevelopers masesdevelopers merged commit 0f04cf2 into masesgroup:master Jan 21, 2024
7 checks passed
@masesdevelopers masesdevelopers deleted the 327-improve-kafka-streams-with-some-specific-knet-classes-7 branch January 21, 2024 02:18
Comment on lines +90 to +104
if (!_keyStored)
{
if (_valueInner2 != null && _valueInner2.key != null)
{
var ll = _valueInner2.key;
_key = (TKey)(object)ll.LongValue();
}
else
{
_keySerDes ??= _factory.BuildKeySerDes<TKey>();
_key = _keySerDes.Deserialize(null, _valueInner1.key);
}
_keyStored = true;
}
return _key;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The logic done here can be applied to many other classes like the one managed from KNetConsumer e.g. KNetConsumerRecord

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request KNet KNet related issue .NET Pull requests that update .net code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve Kafka Streams with some specific KNet classes
1 participant