UNPKG

hazelcast-client

Version:

Hazelcast - open source In-Memory Data Grid - client for NodeJS

33 lines 1.45 kB
"use strict"; var ClientMessage = require('../ClientMessage'); var BitsUtil_1 = require('../BitsUtil'); var LockMessageType_1 = require('./LockMessageType'); var REQUEST_TYPE = LockMessageType_1.LockMessageType.LOCK_GETREMAININGLEASETIME; var RESPONSE_TYPE = 103; var RETRYABLE = true; var LockGetRemainingLeaseTimeCodec = (function () { function LockGetRemainingLeaseTimeCodec() { } LockGetRemainingLeaseTimeCodec.calculateSize = function (name) { var dataSize = 0; dataSize += BitsUtil_1.BitsUtil.calculateSizeString(name); return dataSize; }; LockGetRemainingLeaseTimeCodec.encodeRequest = function (name) { var clientMessage = ClientMessage.newClientMessage(this.calculateSize(name)); clientMessage.setMessageType(REQUEST_TYPE); clientMessage.setRetryable(RETRYABLE); clientMessage.appendString(name); clientMessage.updateFrameLength(); return clientMessage; }; LockGetRemainingLeaseTimeCodec.decodeResponse = function (clientMessage, toObjectFunction) { if (toObjectFunction === void 0) { toObjectFunction = null; } var parameters = { 'response': null }; parameters['response'] = clientMessage.readLong(); return parameters; }; return LockGetRemainingLeaseTimeCodec; }()); exports.LockGetRemainingLeaseTimeCodec = LockGetRemainingLeaseTimeCodec; //# sourceMappingURL=LockGetRemainingLeaseTimeCodec.js.map