001/*
002 * JPPF.
003 * Copyright (C) 2005-2018 JPPF Team.
004 * http://www.jppf.org
005 *
006 * Licensed under the Apache License, Version 2.0 (the "License");
007 * you may not use this file except in compliance with the License.
008 * You may obtain a copy of the License at
009 *
010 *   http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018
019package org.jppf.load.balancer;
020
021/**
022 * A bundler which provides a more advanced feedback method with additional performance data.
023 * @param <T> the type of parameters profile used by this bundler.
024 * @author Laurent Cohen
025 */
026public interface BundlerEx<T extends LoadBalancingProfile> extends Bundler<T> {
027  /**
028   * Feedback the bundler with the result of using the bundle with the specified size.
029   * The feedback data consists in providing a number of tasks that were executed, and their total execution time in milliseconds.
030   * The execution time includes the network round trip between node and server.
031   * @param nbTasks number of tasks that were executed.
032   * @param totalTime the total execution and transport time in nanoseconds.
033   * @param accumulatedElapsed the total accumalated elapsed time (in the node) in nanoseconds for the execution of the tasks.
034   * @param overheadTime the transport time in nanoseconds.
035   */
036  void feedback(final int nbTasks, final double totalTime, final double accumulatedElapsed, final double overheadTime);
037}