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 47 | 41x 41x 41x 41x 4671x 1627x 1131x 1131x 1627x 3540x 3540x 4067x 495x 495x 495x 495x 495x 4671x 3044x 3044x 4671x 41x 41x 25x 25x 25x 25x 25x 25x 25x 41x 41x 984x 984x 984x 984x 41x 41x 2183x 179x 176x 176x 179x 2183x 41x | // Copyright (c) ZeroC, Inc.
export class RequestHandlerCache {
get requestHandler() {
if (this._cacheConnection) {
if (this._cachedRequestHandler !== null) {
return this._cachedRequestHandler;
}
}
let handler = this._reference.getRequestHandler();
if (this._cacheConnection) {
if (this._cachedRequestHandler === null) {
this._cachedRequestHandler = handler;
}
// else ignore handler
return this._cachedRequestHandler;
} else {
return handler;
}
}
get cachedConnection() {
if (this._cacheConnection) {
let handler = this._cachedRequestHandler;
if (handler !== null) {
return handler.getConnection();
}
}
return null;
}
constructor(reference) {
this._reference = reference;
this._cacheConnection = reference.getCacheConnection();
this._cachedRequestHandler = null;
}
clearCachedRequestHandler(handler) {
if (this._cacheConnection) {
if (handler == this._cachedRequestHandler) {
this._cachedRequestHandler = null;
}
}
}
}
|