Пример #1
0
        /** <inheritdoc /> */
        public ICache <TK, TV> CreateCache <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())
            {
                // Use system marshaller: full footers, always unregistered mode.
                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.ProcessorCreateCache(_proc, stream.MemoryPointer)));
            }
        }
Пример #2
0
        /** <inheritdoc /> */
        public ICache <TK, TV> CreateCache <TK, TV>(CacheConfiguration configuration,
                                                    NearCacheConfiguration nearConfiguration)
        {
            IgniteArgumentCheck.NotNull(configuration, "configuration");
            configuration.Validate(Logger);

            using (var stream = IgniteManager.Memory.Allocate().GetStream())
            {
                var writer = 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.ProcessorCreateCache(_proc, stream.MemoryPointer)));
            }
        }
Пример #3
0
        /** <inheritdoc /> */
        public ICache <TK, TV> CreateCache <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.ProcessorCreateCache(_proc, stream.MemoryPointer)));
            }
        }
Пример #4
0
        /** <inheritdoc /> */
        public ICache <TK, TV> CreateCache <TK, TV>(string name)
        {
            IgniteArgumentCheck.NotNull(name, "name");

            return(Cache <TK, TV>(UU.ProcessorCreateCache(_proc, name)));
        }
Пример #5
0
 /** <inheritdoc /> */
 public ICache <TK, TV> CreateCache <TK, TV>(string name)
 {
     return(Cache <TK, TV>(UU.ProcessorCreateCache(_proc, name)));
 }