示例#1
0
        public ICriteria SetFlushMode(FlushMode flushMode)
        {
            ICriteriaEvent criteriaEvent = new SetFlushModeEvent(flushMode);

            foreach (IShard shard in shards)
            {
                if (shard.GetCriteriaById(criteriaId) != null)
                {
                    shard.GetCriteriaById(criteriaId).SetFlushMode(flushMode);
                }
                else
                {
                    shard.AddCriteriaEvent(criteriaId, criteriaEvent);
                }
            }
            return(this);
        }
示例#2
0
        public ICriteria SetFlushMode(FlushMode flushMode)
        {
            ICriteriaEvent criteriaEvent = new SetFlushModeEvent(flushMode);

            foreach (IShard shard in shards)
            {
                if (shardToCriteriaMap[shard] != null)
                {
                    shardToCriteriaMap[shard].SetFlushMode(flushMode);
                }
                else
                {
                    shardToEventListMap[shard].Add(criteriaEvent);
                }
            }
            return(this);
        }