/// <inheritdoc />
        public override async ValueTask InitializeAsync()
        {
            if (Options.InvalidateOnChange)
            {
                try
                {
                    _subscriptionId = await SubscribeToInvalidationEventsAsync().CfAwait();

                    RepairingHandler = new RepairingHandler(Cluster.ClientId, this, _maxToleratedMissCount, Cluster.Partitioner, SerializationService, LoggerFactory);
                    IsInvalidating   = true;
                }
                catch (Exception e)
                {
                    LoggerFactory.CreateLogger <NearCache>().LogCritical(e, "-----------------\n Near Cache is not initialized!!! \n-----------------");
                    IsInvalidating = false;
                }
            }
        }
 /// <summary>
 /// Handle batch invalidation events.
 /// </summary>
 /// <param name="keys">The invalidated keys.</param>
 /// <param name="sourceuuids"></param>
 /// <param name="partitionuuids"></param>
 /// <param name="sequences"></param>
 private ValueTask HandleCodecBatchEvent(IEnumerable <IData> keys, IEnumerable <Guid> sourceuuids, IEnumerable <Guid> partitionuuids, IEnumerable <long> sequences, object state)
 {
     RepairingHandler.Handle(keys, sourceuuids, partitionuuids, sequences);
     return(default);
 /// <summary>
 /// Handle batch invalidation events.
 /// </summary>
 /// <param name="keys">The invalidated keys.</param>
 /// <param name="sourceuuids"></param>
 /// <param name="partitionuuids"></param>
 /// <param name="sequences"></param>
 private ValueTask HandleBatchInvalidationEventAsync(IEnumerable <IData> keys, IEnumerable <Guid> sourceuuids, IEnumerable <Guid> partitionuuids, IEnumerable <long> sequences)
 {
     RepairingHandler.Handle(keys, sourceuuids, partitionuuids, sequences);
     return(default);