Skip to content

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

Merged
kcudnik merged 1 commit intosonic-net:masterfrom
Ashish1805:ledamping_seh
Nov 16, 2023
Merged

[Link Event Damping] Add Abstract SelectEventHandler class to handle link event damping timer events.#1312
kcudnik merged 1 commit intosonic-net:masterfrom
Ashish1805:ledamping_seh

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 ?


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
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