ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Murthy Kakarlamudi <ksa...@gmail.com>
Subject Asynchronous Persistent Store Update
Date Sat, 09 Apr 2016 04:41:52 GMT
Hi,
   I need to update my underlying SQL Server DB asynchronously so that the
cache performance is not impacted. But the DB is getting updated as soon as
the Put operation is getting executed. Below is my xml config and the code
that performs Put operation and from StoreAdapter. Please let me know if I
am missing any additional settings.

<bean class="org.apache.ignite.configuration.CacheConfiguration">
          <property name="writeThrough" value="true"/>
          <property name="readThrough" value="true"/>
          <property name="writeBehindEnabled" value="true"/>
          <property name="writeBehindFlushSize" value="0"/>
          <property name="writeBehindFlushFrequency" value="120000"/>
          <property name="cacheStoreFactory">
            <bean
class="org.apache.ignite.platform.dotnet.PlatformDotNetCacheStoreFactory">
              <property name="typeName"
value="TestIgniteDAL.SQLServerStore, TestIgniteDAL"/>
            </bean>
          </property>
        </bean>

cache.Put(5, new BusinessUnit
                {
                    BUID = 5,
                    BUName = "BU5",
                    CreatedByID = 5
                });

public override void Write(object key, object val)
        {
            entities.BusinessUnits.Add((BusinessUnit)val);
            entities.SaveChanges();
        }

Thanks,
Satya.

Mime
View raw message