001/**
002 * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
003 * agreements. See the NOTICE file distributed with this work for additional information regarding
004 * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
005 * "License"); you may not use this file except in compliance with the License. You may obtain a
006 * copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable
007 * law or agreed to in writing, software distributed under the License is distributed on an "AS IS"
008 * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
009 * for the specific language governing permissions and limitations under the License.
010 */
011package org.apache.hadoop.hbase.replication;
012
013import org.apache.yetus.audience.InterfaceAudience;
014
015/**
016 * A HBase ReplicationLoad to present MetricsSink information
017 */
018@InterfaceAudience.Public
019public class ReplicationLoadSink {
020  private final long ageOfLastAppliedOp;
021  private final long timestampsOfLastAppliedOp;
022  private final long timestampStarted;
023  private final long totalOpsProcessed;
024
025  // TODO: add the builder for this class
026  @InterfaceAudience.Private
027  public ReplicationLoadSink(long age, long timestamp, long timestampStarted,
028      long totalOpsProcessed) {
029    this.ageOfLastAppliedOp = age;
030    this.timestampsOfLastAppliedOp = timestamp;
031    this.timestampStarted = timestampStarted;
032    this.totalOpsProcessed = totalOpsProcessed;
033  }
034
035  public long getAgeOfLastAppliedOp() {
036    return this.ageOfLastAppliedOp;
037  }
038
039  public long getTimestampsOfLastAppliedOp() {
040    return this.timestampsOfLastAppliedOp;
041  }
042
043  public long getTimestampStarted() {
044    return timestampStarted;
045  }
046
047  public long getTotalOpsProcessed() {
048    return totalOpsProcessed;
049  }
050}