From notifications-return-3773-apmail-ignite-notifications-archive=ignite.apache.org@ignite.apache.org Mon Jun 10 16:48:58 2019 Return-Path: X-Original-To: apmail-ignite-notifications-archive@minotaur.apache.org Delivered-To: apmail-ignite-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by minotaur.apache.org (Postfix) with SMTP id 79C6B19618 for ; Mon, 10 Jun 2019 16:48:58 +0000 (UTC) Received: (qmail 15554 invoked by uid 500); 10 Jun 2019 16:48:58 -0000 Delivered-To: apmail-ignite-notifications-archive@ignite.apache.org Received: (qmail 15538 invoked by uid 500); 10 Jun 2019 16:48:58 -0000 Mailing-List: contact notifications-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list notifications@ignite.apache.org Received: (qmail 15529 invoked by uid 99); 10 Jun 2019 16:48:57 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Jun 2019 16:48:57 +0000 From: GitBox To: notifications@ignite.apache.org Subject: [GitHub] [ignite] Mmuzaf commented on a change in pull request #5619: IGNITE-10619: CommunicationSpi support channels initial commit Message-ID: <156018533655.19644.5538963789425543931.gitbox@gitbox.apache.org> Date: Mon, 10 Jun 2019 16:48:56 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Mmuzaf commented on a change in pull request #5619: IGNITE-10619: CommunicationSpi support channels initial commit URL: https://github.com/apache/ignite/pull/5619#discussion_r292093533 ########## File path: modules/core/src/main/java/org/apache/ignite/internal/managers/communication/transmit/FileHandler.java ########## @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.managers.communication.transmit; + +import java.io.File; +import java.io.IOException; +import java.io.Serializable; +import java.util.Map; + +/** + * The {@code FileHandler} represents by itself the way of input data stream processing. All the data will + * be processed under the hood using zero-copy transferring algorithm and only start file processing and + * the end of processing will be provided. + */ +public interface FileHandler { + /** + * @param name The file name transfer from. + * @param pos The start pos pointer of download file in original source. + * @param cnt Total cnt of bytes readed from the original source. + * @param params The additional transfer file description params. + * @return The absolute pathname string denoting the file or {@code null} if there is no sense. + * @throws IOException If fails. + */ + public String begin(String name, long pos, long cnt, Map params) throws IOException; Review comment: 1. I've renamed it to `fileAbsoultePath` as it returns a file path. 2. pos - renamed to offset, cnt - renamed to size. These parameters used when we send a file not from the beginning but from a special offset (e.g. we can transfer a part of the same file placed on different nodes) ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services