Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | 41x 41x 41x 41x 41x 41x 41x 41x 41x 67x 67x 41x 41x 65x 6x 6x 65x 65x 41x 41x 41x 41x 41x 41x 888x 868x 868x 20x 20x 20x 20x 20x 149x 10x 10x 10x 20x 20x 888x 41x 41x 3x 3x 3x 41x | // Copyright (c) ZeroC, Inc. import { HashMap } from "./HashMap.js"; import { Ice as Ice_Router } from "./Router.js"; const { RouterPrx } = Ice_Router; import { RouterInfo } from "./RouterInfo.js"; export class RouterManager { constructor() { this._table = new HashMap(HashMap.compareEquals); // Map<Ice.RouterPrx, RouterInfo> } destroy() { for (const router of this._table.values()) { router.destroy(); } this._table.clear(); } // // Returns router info for a given router. Automatically creates // the router info if it doesn't exist yet. // find(router) { if (router === null) { return null; } // The router cannot be routed. router = RouterPrx.uncheckedCast(router.ice_router(null)); let info = this._table.get(router); if (info === undefined) { info = new RouterInfo(router); this._table.set(router, info); } return info; } erase(router) { console.assert(router.ice_getRouter() == null); // The router cannot be routed. this._table.delete(router); } } |