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
023  // TODO: add the builder for this class
024  @InterfaceAudience.Private
025  public ReplicationLoadSink(long age, long timestamp) {
026    this.ageOfLastAppliedOp = age;
027    this.timestampsOfLastAppliedOp = timestamp;
028  }
029
030  public long getAgeOfLastAppliedOp() {
031    return this.ageOfLastAppliedOp;
032  }
033
034  /**
035   * @deprecated Since hbase-2.0.0. Will be removed in 3.0.0.
036   * @see #getTimestampsOfLastAppliedOp()
037   */
038  @Deprecated
039  public long getTimeStampsOfLastAppliedOp() {
040    return getTimestampsOfLastAppliedOp();
041  }
042
043  public long getTimestampsOfLastAppliedOp() {
044    return this.timestampsOfLastAppliedOp;
045  }
046}