public async Task <IGetResult> GetAndLockAsync(string id, TimeSpan lockTime, GetAndLockOptions?options = null)
        {
            //sanity check for deferred bootstrapping errors
            _bucket.ThrowIfBootStrapFailed();

            options ??= new GetAndLockOptions();
            var transcoder = options.TranscoderValue ?? _transcoder;

            using var getAndLockOp = new GetL <byte[]>
                  {
                      Key        = id,
                      Cid        = Cid,
                      Expiry     = lockTime.ToTtl(),
                      Transcoder = transcoder
                  };
            await _bucket.SendAsync(getAndLockOp, options.TokenValue, options.TimeoutValue).ConfigureAwait(false);

            return(new GetResult(getAndLockOp.ExtractData(), transcoder, _getLogger)
            {
                Id = getAndLockOp.Key,
                Cas = getAndLockOp.Cas,
                Flags = getAndLockOp.Flags,
                Header = getAndLockOp.Header,
                OpCode = getAndLockOp.OpCode
            });
        }
        public async Task <IGetResult> GetAndLockAsync(string id, TimeSpan expiry, GetAndLockOptions options = null)
        {
            options = options ?? new GetAndLockOptions();
            var transcoder = options.Transcoder ?? _transcoder;

            using (var getAndLockOp = new GetL <byte[]>
            {
                Key = id,
                Cid = Cid,
                Expiry = expiry.ToTtl(),
                Transcoder = transcoder
            })
            {
                await _bucket.SendAsync(getAndLockOp, options.Token, options.Timeout);

                return(new GetResult(getAndLockOp.ExtractData(), transcoder)
                {
                    Id = getAndLockOp.Key,
                    Cas = getAndLockOp.Cas,
                    Flags = getAndLockOp.Flags,
                    Header = getAndLockOp.Header,
                    OpCode = getAndLockOp.OpCode
                });
            }
        }
        public async Task <IGetResult> GetAndLockAsync(string id, TimeSpan expiration, GetAndLockOptions options)
        {
            using (var getAndLockOp = new GetL <byte[]>
            {
                Key = id,
                Cid = Cid,
                Expiration = expiration.ToTtl()
            })
            {
                await ExecuteOp(getAndLockOp, options.Token, options.Timeout);

                return(new GetResult(getAndLockOp.ExtractData(), _transcoder));
            }
        }