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, 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 */
018package org.apache.hadoop.hbase.hbtop.screen.top;
019
020import java.util.Objects;
021import org.apache.yetus.audience.InterfaceAudience;
022
023/**
024 * Represents the summary of the metrics.
025 */
026@InterfaceAudience.Private
027public class Summary {
028  private final String currentTime;
029  private final String version;
030  private final String clusterId;
031  private final int servers;
032  private final int liveServers;
033  private final int deadServers;
034  private final int regionCount;
035  private final int ritCount;
036  private final double averageLoad;
037  private final long aggregateRequestPerSecond;
038
039  public Summary(String currentTime, String version, String clusterId, int servers, int liveServers,
040    int deadServers, int regionCount, int ritCount, double averageLoad,
041    long aggregateRequestPerSecond) {
042    this.currentTime = Objects.requireNonNull(currentTime);
043    this.version = Objects.requireNonNull(version);
044    this.clusterId = Objects.requireNonNull(clusterId);
045    this.servers = servers;
046    this.liveServers = liveServers;
047    this.deadServers = deadServers;
048    this.regionCount = regionCount;
049    this.ritCount = ritCount;
050    this.averageLoad = averageLoad;
051    this.aggregateRequestPerSecond = aggregateRequestPerSecond;
052  }
053
054  public String getCurrentTime() {
055    return currentTime;
056  }
057
058  public String getVersion() {
059    return version;
060  }
061
062  public String getClusterId() {
063    return clusterId;
064  }
065
066  public int getServers() {
067    return servers;
068  }
069
070  public int getLiveServers() {
071    return liveServers;
072  }
073
074  public int getDeadServers() {
075    return deadServers;
076  }
077
078  public int getRegionCount() {
079    return regionCount;
080  }
081
082  public int getRitCount() {
083    return ritCount;
084  }
085
086  public double getAverageLoad() {
087    return averageLoad;
088  }
089
090  public long getAggregateRequestPerSecond() {
091    return aggregateRequestPerSecond;
092  }
093}