public static void CheckNodeVersionId(object entity, ConcurrentHashedCollection<Guid> modifiedVersionIds)
 {
     var casted = entity as NodeVersion;
     if (casted != null)
     {
         modifiedVersionIds.Add(casted.Node.Id);
     }
 }
        public static void CheckNodeVersionId(object entity, ConcurrentHashedCollection <Guid> modifiedVersionIds)
        {
            var casted = entity as NodeVersion;

            if (casted != null)
            {
                modifiedVersionIds.Add(casted.Node.Id);
            }
        }
        public static void UpdateAggregatesPostFlush(ConcurrentHashedCollection<Guid> modifiedVersionIds, ISession nhSession)
        {
            // After a flush, keep the aggregates up to date
            // We do this after a flush so that if other queries are run in the same
            // transaction, the aggregate table will have been updated before those
            // selects get run in the db engine
            try
            {
                var updatedNodeIds = modifiedVersionIds.ToArray();

                NhSessionHelper.DeleteAggregateForNodeIds(updatedNodeIds, nhSession);
                NhSessionHelper.RunAggregateForNodeIds(updatedNodeIds, "AggregateNodeStatus_PerNode", nhSession);
            }
            finally
            {
                modifiedVersionIds.Clear();
            }
        }
        public static void UpdateAggregatesPostFlush(ConcurrentHashedCollection <Guid> modifiedVersionIds, ISession nhSession)
        {
            // After a flush, keep the aggregates up to date
            // We do this after a flush so that if other queries are run in the same
            // transaction, the aggregate table will have been updated before those
            // selects get run in the db engine
            try
            {
                var updatedNodeIds = modifiedVersionIds.ToArray();

                NhSessionHelper.DeleteAggregateForNodeIds(updatedNodeIds, nhSession);
                NhSessionHelper.RunAggregateForNodeIds(updatedNodeIds, "AggregateNodeStatus_PerNode", nhSession);
            }
            finally
            {
                modifiedVersionIds.Clear();
            }
        }
示例#5
0
 private ConcurrentHashedCollection<Guid> EnsureVersionIdsInitialised()
 {
     return _modifiedVersionIds ?? (_modifiedVersionIds = new ConcurrentHashedCollection<Guid>());
 }
示例#6
0
 private ConcurrentHashedCollection <Guid> EnsureVersionIdsInitialised()
 {
     return(_modifiedVersionIds ?? (_modifiedVersionIds = new ConcurrentHashedCollection <Guid>()));
 }