Example #1
0
        /** <inheritDoc /> */
        public ICache <TK1, TV1> WithKeepBinary <TK1, TV1>()
        {
            if (_flagKeepBinary)
            {
                var result = this as ICache <TK1, TV1>;

                if (result == null)
                {
                    throw new InvalidOperationException(
                              "Can't change type of binary cache. WithKeepBinary has been called on an instance of " +
                              "binary cache with incompatible generic arguments.");
                }

                return(result);
            }

            return(new CacheImpl <TK1, TV1>(_ignite, UU.CacheWithKeepBinary(Target), Marshaller,
                                            _flagSkipStore, true, _flagAsync, _flagNoRetries));
        }