Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-4233

Make THsHaServer.invoker available (get method only) in inherited classes

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.10.0
    • 0.11.0
    • Java - Library
    • None

    Description

      In some cases (for example in Apache Camel component for Thrift) there is a requirement, when it is necessary not only to transfer executorService from the external system through the Args in THsHaServer , but to organize control them from outside. In this case, it's possible to create a class which is inherited from THsHaServer, but not possible to access invoker in overloaded gracefullyShutdownInvokerPool(). As workaround the TNonblockingServer must be extended but requires to create several methods from scratch.
      It's necessary to add code below to THsHaServer

      protected ExecutorService getInvoker() {
        return invoker;
      }
      

      I'm ready to add this code as PR.

      Attachments

        Issue Links

          Activity

            People

              jking3 James E. King III
              dmvolod Dmitry Volodin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: