ignite-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [ignite] nizhikov commented on a change in pull request #5619: IGNITE-10619: CommunicationSpi support channels initial commit
Date Mon, 10 Jun 2019 09:13:51 GMT
nizhikov commented on a change in pull request #5619: IGNITE-10619: CommunicationSpi support
channels initial commit
URL: https://github.com/apache/ignite/pull/5619#discussion_r291936473
 
 

 ##########
 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<String, Serializable>
params) throws IOException;
 
 Review comment:
   1. This method shouldn't be named 'begin' as it return some path - 'fileName' is more convenient.
   2. How pos and cnt params should be used?

----------------------------------------------------------------
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

Mime
View raw message