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

[Link Event Damping] Add Abstract SelectEventHandler class to handle link event damping timer events. #1312

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

Ashish1805
Copy link
Contributor

  • Handler in the class will be used to handle the timer event of link event dampers.

HLD: sonic-net/SONiC#1071

@Ashish1805
Copy link
Contributor Author

Adding @Junchao-Mellanox for review.


protected:

SelectableEventHandler()
Copy link
Contributor

Choose a reason for hiding this comment

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

do we really need this?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Why constructor is protected ?

syncd/SelectableEventHandler.h Outdated Show resolved Hide resolved

protected:

SelectableEventHandler()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why constructor is protected ?

@Ashish1805
Copy link
Contributor Author

@kcudnik Please let me know if you have any other comments/concerns. If everything looks good, can you please merge the PR? Thank you.

@kcudnik
Copy link
Collaborator

kcudnik commented Nov 14, 2023

You did not answered my questions about protected constructors

@Ashish1805
Copy link
Contributor Author

You did not answered my questions about protected constructors

In another comment reply, I had added the explanation:

Strictly speaking constructor is not needed, but constructor was added as protected just to make it clear to clients that they cannot directly instantiate an object of the class.

Agree, this class still be uninstantiable because of the pure virtual method, but to put the emphasize on not trying to directly instantiate this class, protected constructor was kept.

I am inclined to keep constructor as:
protected:
SelectableEventHandler() = default;

Thank you.

link event damping timer events.

- Handler in the class will be used to handle the timer event of link
  event dampers.

HLD: sonic-net/SONiC#1071
@kcudnik kcudnik merged commit ea78e60 into sonic-net:master Nov 16, 2023
13 checks passed
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