public BaseAccountingDemo()
		{
			// reset all global states, to allow model switching
			ServiceManager.Init();
			m_vmST = ServiceManager.ComputeNode.VMSpacetimeForUnitTest;

			//m_namingSvc = NamingSvcClient.Instance;
			m_accountingInvoker = InvocationBuilder.Build<IAccounting>();
		}
Beispiel #2
0
		public static void Reset(EReset reset = EReset.Weak, VMSpacetime vmST = null)
		{
			if (reset == EReset.Weak)
				m_pseudoSync.Reset();
			else if (reset == EReset.Strong)
			{
				m_pseudoSync = null;
				LocatingService = null;
				SyncService = null;
				m_initialized = false;
				Init(vmST);
			}
		}
Beispiel #3
0
		public ComputeNode(int n, int upperbound, DeployMode deployMode)
		{
			m_nodeSerial = n;
			if (deployMode == DeployMode.Debug || deployMode == DeployMode.UnitTest)
				HIdFactory = new ITCIdentityFactory(4, 4);
			else
				HIdFactory = new ITCIdentityFactory();

			// TODO: merge-able ITC
			m_nodeRoot = HIdFactory.CreateFromRoot(upperbound).ElementAt(n);

			if (m_nodeSerial == 0)
			{
				m_vmstStandalone = new VMSpacetime(CreateHid(), HIdFactory);
			}
		}
Beispiel #4
0
		public static void Init(VMSpacetime vmST = null)
		{
			if (m_initialized)
				return;

			m_initialized = true;

			m_pseudoSync = new DOA.PseudoSyncMgr();
			LocatingService = m_pseudoSync;
			SyncService = m_pseudoSync;
			ReinitComputeNode();

			if (vmST == null)
				vmST = ComputeNode.VMSpacetimeForUnitTest;

			m_pseudoSync.Initialize(vmST);
		}
Beispiel #5
0
		public void Initialize(VMSpacetime vmST)
		{
			m_vmST = vmST;
			m_vmStateId = vmST.VMStateId;
		}