コード例 #1
0
 public static void CheckNodeVersionId(object entity, ConcurrentHashedCollection<Guid> modifiedVersionIds)
 {
     var casted = entity as NodeVersion;
     if (casted != null)
     {
         modifiedVersionIds.Add(casted.Node.Id);
     }
 }
コード例 #2
0
        public static void CheckNodeVersionId(object entity, ConcurrentHashedCollection <Guid> modifiedVersionIds)
        {
            var casted = entity as NodeVersion;

            if (casted != null)
            {
                modifiedVersionIds.Add(casted.Node.Id);
            }
        }
コード例 #3
0
        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();
            }
        }
コード例 #4
0
        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>()));
 }