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); }
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); }