PoolDefaults.js 692 B

12345678910111213141516171819202122232425262728293031323334
  1. "use strict";
  2. /**
  3. * Create the default settings used by the pool
  4. *
  5. * @class
  6. */
  7. class PoolDefaults {
  8. constructor() {
  9. this.fifo = true;
  10. this.priorityRange = 1;
  11. this.testOnBorrow = false;
  12. this.testOnReturn = false;
  13. this.autostart = true;
  14. this.evictionRunIntervalMillis = 0;
  15. this.numTestsPerEvictionRun = 3;
  16. this.softIdleTimeoutMillis = -1;
  17. this.idleTimeoutMillis = 30000;
  18. // FIXME: no defaults!
  19. this.acquireTimeoutMillis = null;
  20. this.destroyTimeoutMillis = null;
  21. this.maxWaitingClients = null;
  22. this.min = null;
  23. this.max = null;
  24. // FIXME: this seems odd?
  25. this.Promise = Promise;
  26. }
  27. }
  28. module.exports = PoolDefaults;