Beispiel #1
0
 private void CheckStatics()
 {
     InitializeAspects();
     while (_statics.HasNext())
     {
         var classMetadata = ((ClassMetadata)_statics.Next());
         classMetadata.StoreStaticFieldValues(_systemTransaction, true);
         _writes.Add(classMetadata);
         InitializeAspects();
     }
 }
Beispiel #2
0
 public virtual void Run()
 {
     try
     {
         var     socket = stream.CreateParallelSocket();
         MsgBlob msg    = null;
         // no blobLock synchronisation here, since our first msg is valid
         lock (queue)
         {
             msg = (MsgBlob)queue.Next();
         }
         while (msg != null)
         {
             msg.Write(socket);
             msg.ProcessClient(socket);
             lock (stream._blobLock)
             {
                 lock (queue)
                 {
                     msg = (MsgBlob)queue.Next();
                 }
                 if (msg == null)
                 {
                     terminated = true;
                     Msg.CloseSocket.Write(socket);
                     try
                     {
                         socket.Close();
                     }
                     catch (Exception)
                     {
                     }
                 }
             }
         }
     }
     catch (Exception e)
     {
         Runtime.PrintStackTrace(e);
     }
 }
Beispiel #3
0
 private void CheckWrites()
 {
     CheckStatics();
     while (_writes.HasNext())
     {
         ClassMetadata classMetadata = ((ClassMetadata)_writes.Next());
         classMetadata.SetStateDirty();
         classMetadata.Write(_systemTransaction);
         _inits.Add(classMetadata);
         CheckStatics();
     }
 }
Beispiel #4
0
 public virtual void TraverseGraph(object @object, IVisitor visitor)
 {
     QueueUpForTraversing(@object);
     while (true)
     {
         object next = _queue.Next();
         if (next == null)
         {
             return;
         }
         TraverseObject(next, visitor);
     }
 }
Beispiel #5
0
 public virtual object Next()
 {
     return(_queue.Next());
 }
Beispiel #6
0
 public virtual int NextId()
 {
     return((int)_queue.Next());
 }
		private void AssertNext(object[] expected, IQueue4 queue)
		{
			for (int i = 0; i < expected.Length; i++)
			{
				object @object = expected[i];
				Assert.IsTrue(queue.HasNext(), "Expecting '" + @object + "'");
				Assert.AreSame(@object, queue.Next());
			}
			Assert.IsFalse(queue.HasNext());
		}