/// <summary> /// Get the collection page only when nedded. Gets from pager always to garantee that wil be the last (in case of clear cache will get a new one - pageID never changes) /// </summary> private CollectionPage GetCollectionPage(string name, bool addIfNotExits) { // search my page on collection service var col = _collections.Get(name); if (col == null && addIfNotExits) { _log.Write(Logger.COMMAND, "create new collection '{0}'", name); col = _collections.Add(name); } return(col); }
/// <summary> /// Get the collection page only when nedded. Gets from pager always to garantee that wil be the last (in case of clear cache will get a new one - pageID never changes) /// </summary> private CollectionPage GetCollectionPage(string name, bool addIfNotExits) { // before get a collection, avoid dirty reads _transaction.AvoidDirtyRead(); // search my page on collection service var col = _collections.Get(name); if (col == null && addIfNotExits) { _log.Write(Logger.COMMAND, "create new collection '{0}'", name); col = _collections.Add(name); } return(col); }