PoolDefaults.js 654 B

123456789101112131415161718192021222324252627282930313233
  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.maxWaitingClients = null;
  21. this.min = null;
  22. this.max = null;
  23. // FIXME: this seems odd?
  24. this.Promise = Promise;
  25. }
  26. }
  27. module.exports = PoolDefaults;