public LocalMailbox(PostOffice postOffice, VertexInput <S, T> endpoint, int id, int vertexId) { this.postOffice = postOffice; this.dirty = false; this.endpoint = endpoint; this.id = id; this.vertexId = vertexId; this.graphId = endpoint.Vertex.Stage.InternalComputation.Index; }
public Mailbox(PostOffice postOffice, Runtime.Progress.ProgressUpdateCentralizer consumer, int id, int vertexId) { this.postOffice = postOffice; this.consumer = consumer; this.id = id; this.vertexId = vertexId; this.graphId = this.consumer.Stage.InternalComputation.Index; this.decoder = new AutoSerializedMessageDecoder <Update, Empty>(consumer.SerializationFormat); }
public Mailbox(PostOffice postOffice, Runtime.Progress.ProgressUpdateConsumer consumer, int id, int vertexId, int numProducers) { this.postOffice = postOffice; this.consumer = consumer; this.graphid = this.consumer.Stage.InternalComputation.Index; this.id = id; this.vertexId = vertexId; this.nextSequenceNumbers = new int[numProducers]; this.decoder = new AutoSerializedMessageDecoder <Update, Empty>(consumer.SerializationFormat); }
public LegacyLocalMailbox(PostOffice postOffice, VertexInput <S, T> endpoint, int id, int vertexId) : base(postOffice, endpoint, id, vertexId) { this.sharedQueue = new ConcurrentQueue <Message <S, T> >(); this.sharedSerializedQueue = new ConcurrentQueue <SerializedMessage>(); this.privateQueue = new Queue <Message <S, T> >(); this.messagesFromLocalVertices = new Message <S, T> [this.postOffice.Controller.Workers.Count]; for (int i = 0; i < this.postOffice.Controller.Workers.Count; ++i) { this.messagesFromLocalVertices[i] = new Message <S, T>(); } this.decoder = new AutoSerializedMessageDecoder <S, T>(endpoint.Vertex.SerializationFormat); }
public SpillingLocalMailbox(PostOffice postoffice, VertexInput <S, T> endpoint, int id, int vertexId, Runtime.Progress.ProgressUpdateBuffer <T> progressBuffer) : base(postoffice, endpoint, id, vertexId) { this.pageSize = this.endpoint.Vertex.Stage.InternalGraphManager.Controller.Configuration.SendPageSize; this.progressBuffer = progressBuffer; this.messagesFromLocalThreads = new SendBufferPage[endpoint.Vertex.Stage.InternalGraphManager.Controller.Workers.Count]; string fileName = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); this.spillStream = new FileStream(fileName, FileMode.CreateNew, FileAccess.Write, FileShare.ReadWrite, 1 << 20);//, FileOptions.WriteThrough); this.consumeStream = File.Open(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); this.pagesWritten = 0; this.pagesRead = 0; this.pagesFlushed = 0; }
// if you provide a destinationCollectionId for the mailbox, it will use progress magic. public LegacyLocalMailbox(PostOffice postOffice, VertexInput <S, T> endpoint, int id, int vertexId, Runtime.Progress.ProgressUpdateBuffer <T> progressBuffer) : this(postOffice, endpoint, id, vertexId) { this.progressBuffer = progressBuffer; }