2016-10-20 00:42:53 +08:00
|
|
|
'use strict';
|
|
|
|
|
2019-12-24 01:19:08 +08:00
|
|
|
function FixedCapacity (capacity) {
|
2016-10-20 00:42:53 +08:00
|
|
|
this.capacity = Math.max(1, capacity);
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = FixedCapacity;
|
|
|
|
|
2019-12-24 01:19:08 +08:00
|
|
|
FixedCapacity.prototype.getCapacity = function (callback) {
|
2016-10-20 00:42:53 +08:00
|
|
|
return callback(null, this.capacity);
|
|
|
|
};
|