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 4796x 1757x 1235x 1235x 1757x 3561x 3561x 4191x 521x 521x 521x 521x 521x 4796x 3039x 3039x 4796x 41x 41x 25x 25x 25x 25x 25x 25x 25x 41x 41x 1090x 1090x 1090x 1090x 41x 41x 2180x 176x 173x 173x 176x 2180x 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;
}
}
}
}
|