Uploaded image for project: 'Apache Curator'
  1. Apache Curator
  2. CURATOR-562

Remove ConnectionHandlingPolicy

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 5.0.0
    • Framework
    • None

    Description

      Back to the day we bump Curator from 2.x to 3.0 we introduce ConnectionHandlingPolicy as a bridge that provides different strategy on handling different session timeout logic.

      Things changed and now only the StandardConnectionHandlingPolicy survive, who has two methods

      1. checkTimeouts totally static utility. Besides, some values in CheckTimeoutsResult seems out of day that we might have a follow-up to handle it. Anyway, I don't thing anyone outside Curator should change the behavior here since it is tight couple with how o.a.c.ConnectionState works.
      2. callWithRetry it is actually a consignee of RetryLoop#callWithRetry. According to its implementation it seems hardly an outside user can properly define his callWithRetry method.

      Thus, I propose that we flatten this legacy class.

      DISCLAIMER:
      The place from where I come here is CURATOR-544 that I'd like to implement a user-friendly option to enable Curator blocks its regenerate ZooKeeper client logic on SESSIONEXPIRED.

      However, neither ConnectionHandlingPolicy nor RetryLoop nor RetryPolicy is a good place since implementations coupled quite a bit. And the real regeneration logic hided inside ConnectionState.

      Thus I'm willing to do a bit code cleanups to see where we can properly inject such logics.

      Attachments

        Issue Links

          Activity

            People

              randgalt Jordan Zimmerman
              tison Zili Chen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 4h
                  4h