This project has retired. For details please refer to its Attic page.
Source code
001/*
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements.  See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership.  The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License.  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,
013 * software distributed under the License is distributed on an
014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015 * KIND, either express or implied.  See the License for the
016 * specific language governing permissions and limitations
017 * under the License.
018 */
019package org.apache.reef.wake.metrics;
020
021/**
022 * Histogram.
023 */
024public interface Histogram {
025
026  /**
027   * Updates the value in this histogram.
028   *
029   * @param value the new value
030   */
031  void update(long value);
032
033  /**
034   * Returns the number of recorded values.
035   *
036   * @return the number of recorded values
037   */
038  long getCount();
039
040  /**
041   * Returns the value of the index.
042   *
043   * @param index the histogram bin index
044   * @return the value of the index
045   * @throws IndexOutOfBoundsException
046   */
047  long getValue(int index);
048
049  /**
050   * Returns the number of bins.
051   *
052   * @return the number of bins
053   */
054  int getNumBins();
055}