Exemple #1
0
        /** <inheritdoc /> */
        public ICache <TK, TV> GetOrCreateCache <TK, TV>(CacheConfiguration configuration,
                                                         NearCacheConfiguration nearConfiguration)
        {
            IgniteArgumentCheck.NotNull(configuration, "configuration");
            IgniteArgumentCheck.NotNull(configuration.Name, "CacheConfiguration.Name");
            configuration.Validate(Logger);

            using (var stream = IgniteManager.Memory.Allocate().GetStream())
            {
                var writer = BinaryUtils.Marshaller.StartMarshal(stream);

                configuration.Write(writer);

                if (nearConfiguration != null)
                {
                    writer.WriteBoolean(true);
                    nearConfiguration.Write(writer);
                }
                else
                {
                    writer.WriteBoolean(false);
                }

                stream.SynchronizeOutput();

                return(Cache <TK, TV>(UU.ProcessorGetOrCreateCache(_proc, stream.MemoryPointer)));
            }
        }
Exemple #2
0
        /** <inheritdoc /> */
        public ICache <TK, TV> GetOrCreateCache <TK, TV>(CacheConfiguration configuration)
        {
            IgniteArgumentCheck.NotNull(configuration, "configuration");

            using (var stream = IgniteManager.Memory.Allocate().GetStream())
            {
                var writer = Marshaller.StartMarshal(stream);

                configuration.Write(writer);

                stream.SynchronizeOutput();

                return(Cache <TK, TV>(UU.ProcessorGetOrCreateCache(_proc, stream.MemoryPointer)));
            }
        }
Exemple #3
0
        /** <inheritdoc /> */
        public ICache <TK, TV> GetOrCreateCache <TK, TV>(string name)
        {
            IgniteArgumentCheck.NotNull(name, "name");

            return(Cache <TK, TV>(UU.ProcessorGetOrCreateCache(_proc, name)));
        }
Exemple #4
0
 /** <inheritdoc /> */
 public ICache <TK, TV> GetOrCreateCache <TK, TV>(string name)
 {
     return(Cache <TK, TV>(UU.ProcessorGetOrCreateCache(_proc, name)));
 }