1 /** 2 * Licensed to the Apache Software Foundation (ASF) under one or more 3 * contributor license agreements. See the NOTICE file distributed with this 4 * work for additional information regarding copyright ownership. The ASF 5 * licenses this file to you under the Apache License, Version 2.0 (the 6 * "License"); you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 14 * License for the specific language governing permissions and limitations under 15 * the License. 16 */ 17 package org.apache.hadoop.hdfs.server.namenode.startupprogress; 18 19 import org.apache.hadoop.classification.InterfaceAudience; 20 21 /** 22 * Abstract base of internal data structures used for tracking progress. For 23 * primitive long properties, {@link Long#MIN_VALUE} is used as a sentinel value 24 * to indicate that the property is undefined. 25 */ 26 @InterfaceAudience.Private 27 abstract class AbstractTracking implements Cloneable { 28 long beginTime = Long.MIN_VALUE; 29 long endTime = Long.MIN_VALUE; 30 31 /** 32 * Subclass instances may call this method during cloning to copy the values of 33 * all properties stored in this base class. 34 * 35 * @param dest AbstractTracking destination for copying properties 36 */ copy(AbstractTracking dest)37 protected void copy(AbstractTracking dest) { 38 dest.beginTime = beginTime; 39 dest.endTime = endTime; 40 } 41 } 42