You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
582 B
29 lines
582 B
"use strict";
|
|
|
|
const Deferred = require("./Deferred");
|
|
|
|
/**
|
|
* Plan is to maybe add tracking via Error objects
|
|
* and other fun stuff!
|
|
*/
|
|
|
|
class ResourceLoan extends Deferred {
|
|
/**
|
|
*
|
|
* @param {any} pooledResource the PooledResource this loan belongs to
|
|
* @return {any} [description]
|
|
*/
|
|
constructor(pooledResource, Promise) {
|
|
super(Promise);
|
|
this._creationTimestamp = Date.now();
|
|
this.pooledResource = pooledResource;
|
|
}
|
|
|
|
reject() {
|
|
/**
|
|
* Loans can only be resolved at the moment
|
|
*/
|
|
}
|
|
}
|
|
|
|
module.exports = ResourceLoan;
|
|
|