UNPKG

@hpcc-js/comms

Version:
159 lines 5.66 kB
import { __extends } from "tslib"; import { Cache, StateObject } from "@hpcc-js/util"; import { MachineService } from "../services/wsMachine"; var MachineCache = /** @class */ (function (_super) { __extends(MachineCache, _super); function MachineCache() { return _super.call(this, function (obj) { return obj.Address; }) || this; } return MachineCache; }(Cache)); export { MachineCache }; var _machines = new MachineCache(); var Machine = /** @class */ (function (_super) { __extends(Machine, _super); function Machine(optsConnection) { var _this = _super.call(this) || this; if (optsConnection instanceof MachineService) { _this.connection = optsConnection; } else { _this.connection = new MachineService(optsConnection); } return _this; } Object.defineProperty(Machine.prototype, "Address", { get: function () { return this.get("Address"); }, enumerable: false, configurable: true }); Object.defineProperty(Machine.prototype, "ConfigAddress", { get: function () { return this.get("ConfigAddress"); }, enumerable: false, configurable: true }); Object.defineProperty(Machine.prototype, "Name", { get: function () { return this.get("Name"); }, enumerable: false, configurable: true }); Object.defineProperty(Machine.prototype, "ProcessType", { get: function () { return this.get("ProcessType"); }, enumerable: false, configurable: true }); Object.defineProperty(Machine.prototype, "DisplayType", { get: function () { return this.get("DisplayType"); }, enumerable: false, configurable: true }); Object.defineProperty(Machine.prototype, "Description", { get: function () { return this.get("Description"); }, enumerable: false, configurable: true }); Object.defineProperty(Machine.prototype, "AgentVersion", { get: function () { return this.get("AgentVersion"); }, enumerable: false, configurable: true }); Object.defineProperty(Machine.prototype, "Contact", { get: function () { return this.get("Contact"); }, enumerable: false, configurable: true }); Object.defineProperty(Machine.prototype, "Location", { get: function () { return this.get("Location"); }, enumerable: false, configurable: true }); Object.defineProperty(Machine.prototype, "UpTime", { get: function () { return this.get("UpTime"); }, enumerable: false, configurable: true }); Object.defineProperty(Machine.prototype, "ComponentName", { get: function () { return this.get("ComponentName"); }, enumerable: false, configurable: true }); Object.defineProperty(Machine.prototype, "ComponentPath", { get: function () { return this.get("ComponentPath"); }, enumerable: false, configurable: true }); Object.defineProperty(Machine.prototype, "RoxieState", { get: function () { return this.get("RoxieState"); }, enumerable: false, configurable: true }); Object.defineProperty(Machine.prototype, "RoxieStateDetails", { get: function () { return this.get("RoxieStateDetails"); }, enumerable: false, configurable: true }); Object.defineProperty(Machine.prototype, "OS", { get: function () { return this.get("OS"); }, enumerable: false, configurable: true }); Object.defineProperty(Machine.prototype, "ProcessNumber", { get: function () { return this.get("ProcessNumber"); }, enumerable: false, configurable: true }); Object.defineProperty(Machine.prototype, "Channels", { get: function () { return this.get("Channels"); }, enumerable: false, configurable: true }); Object.defineProperty(Machine.prototype, "Processors", { get: function () { return this.get("Processors"); }, enumerable: false, configurable: true }); Object.defineProperty(Machine.prototype, "Storage", { get: function () { return this.get("Storage"); }, enumerable: false, configurable: true }); Object.defineProperty(Machine.prototype, "Running", { get: function () { return this.get("Running"); }, enumerable: false, configurable: true }); Object.defineProperty(Machine.prototype, "PhysicalMemory", { get: function () { return this.get("PhysicalMemory"); }, enumerable: false, configurable: true }); Object.defineProperty(Machine.prototype, "VirtualMemory", { get: function () { return this.get("VirtualMemory"); }, enumerable: false, configurable: true }); Object.defineProperty(Machine.prototype, "ComponentInfo", { get: function () { return this.get("ComponentInfo"); }, enumerable: false, configurable: true }); Object.defineProperty(Machine.prototype, "Exception", { get: function () { return this.get("Exception"); }, enumerable: false, configurable: true }); Machine.attach = function (optsConnection, address, state) { var retVal = _machines.get({ Address: address }, function () { return new Machine(optsConnection); }); if (state) { retVal.set(state); } return retVal; }; return Machine; }(StateObject)); export { Machine }; //# sourceMappingURL=machine.js.map