public void AddDataUnit(IProcessingUnit process, int position) { dataUnits[position] = process; dataUnits[position].IsInputStreamConnected = false; dataUnits[position].IsDataStreamConnected = false; dataUnits[position].IsLogStreamConnected = false; }
public Monitor(int crawlerCount, IProcessingUnit processingUnit) { _allUrls = new HashSet <string>(); _readyToCrawl = new Queue <string>(); _urlContent = new Dictionary <string, string>(); MaxCrawlerCount = crawlerCount; _processingUnit = processingUnit; WorkingCrawlerCount = 0; }
/// <summary> /// Calculates the result of this boolean expression /// </summary> public override bool Result(IProcessingUnit pu) { if (AndSet.Contains(_operator)) { return(_left.Result(pu) && _right.Result(pu)); } if (OrSet.Contains(_operator)) { return(_left.Result(pu) || _right.Result(pu)); } Godot.GD.PushError("Unknown operator " + _operator); return(false); }
public void startDataGrid() { try { // create an admin instance to interact with the cluster IServiceGridAdmin admin = new ServiceGridAdminBuilder().CreateAdmin(); // locate a grid service manager and deploy a partioned data grid // with 2 primaries and one backup for each primary IGridServiceManager mgr = admin.GridServiceManagers.WaitForAtLeastOne(); IProcessingUnit pu = mgr.Deploy(new SpaceDeployment(spaceName).Partitioned(2, 1)); ISpaceProxy spaceProxy = pu.WaitForSpace().SpaceProxy; } catch (Exception e) { // already deployed, do nothing Console.WriteLine(e.StackTrace); } }
/// <summary> /// Calculates the result of this boolean expression /// </summary> public override bool Result(IProcessingUnit pu) { switch (_operator) { case GreaterThan: return(_left.Result(pu) > _right.Result(pu)); case SmallerThan: return(_left.Result(pu) < _right.Result(pu)); case GreaterEqual: return(_left.Result(pu) >= _right.Result(pu)); case SmallerEqual: return(_left.Result(pu) <= _right.Result(pu)); case Equal: case EqualSingle: return(_left.Result(pu) == _right.Result(pu)); } Godot.GD.PushError("Unknown operator " + _operator); return(false); }
public Crawler(IProcessingUnit processingUnit) { _processingUnit = processingUnit; }
/// <summary> /// Calculates the result of this boolean expression /// </summary> public override bool Result(IProcessingUnit pu) { return(pu.LookupBoolVariable(_key)); }
/// <summary> /// Calculates the result of this numerical expression /// </summary> public override int Result(IProcessingUnit pu) { return(_number); }
/// <summary> /// Calculates the result of this boolean expression /// </summary> public override int Result(IProcessingUnit pu) { return(pu.LookupIntVariable(_key)); }
/// <summary> /// Calculates the result of this boolean expression /// </summary> public override bool Result(IProcessingUnit pu) { return(_target.Result(pu)); }
/// <summary> /// Executes the assignment according to the model. /// </summary> public abstract void Execute(IProcessingUnit pu);
/// <summary> /// Executes the assignment according to the model. /// </summary> public override void Execute(IProcessingUnit pu) { pu.OutputRegisters.SetValue(_target, _source.Result(pu)); }
/// <summary> /// Calculates the result of this boolean expression /// </summary> public override int Result(IProcessingUnit pu) { return(pu.InputRegisters.PollInteger(_key)); }
/// <summary> /// Calculates the result of this boolean expression /// </summary> public abstract bool Result(IProcessingUnit pu);
/// <summary> /// Calculates the result of this boolean expression /// </summary> public override bool Result(IProcessingUnit pu) { return(_value); }
/// <summary> /// Calculates the result of this boolean expression /// </summary> public override bool Result(IProcessingUnit pu) { return(pu.InputRegisters.PollBoolean(_key)); }
/// <summary> /// Calculates the result of this numerical expression /// </summary> public abstract int Result(IProcessingUnit pu);