Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

RFC Title

To be Reviewed By: 12/11/2019

Authors: Dan Smith

Status: Draft | Discussion | Active | Dropped | Superseded

...

We will add a new interface , called PoolService, which can be obtained from the ClientCache. It will be similar to PoolManager , but it will have instance methods instead of static methods.  We will deprecate the PoolManager class.

For now , the  the methods on the new PoolService will just delegate directly to PoolManager. Any pools created with PoolManager or PoolService will be visible in both. However, in In the future we will be able to remove PoolManager entirely once users are migrated to PoolService.

Code Block
public interface PoolService {
  // this will delegate to PoolManager.createFactory(). Javadocs will be copied from that method
  PoolFactory createPoolFactory();   
   //Delegates to PoolManager.find
   Pool find(String name) {
   
  //Delegates to PoolManager.getAll
  static Map<String, Pool> getAll();

  //The close methods of PoolManager will not  be present in PoolService
  //The lifecycle of PoolService is tied to the cache 
}

public interface ClientCache  {
  ...
  PoolService getPoolService();
}


Performance Impact

Do you anticipate the proposed changes to impact performance in any way? Are there plans to measure and/or mitigate the impact?n/a

Backwards Compatibility and Upgrade Path

We will be deprecating, not removing PoolManager, so it the client will continue to be backwards compatible.

FAQ

Answers to questions you’ve commonly been asked after requesting comments for this proposal.

...