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.namequeues; 019 020import org.apache.yetus.audience.InterfaceAudience; 021 022@InterfaceAudience.Private 023public class WALEventTrackerPayload extends NamedQueuePayload { 024 025 private final String rsName; 026 private final String walName; 027 private final long timeStamp; 028 private final String state; 029 private final long walLength; 030 031 public WALEventTrackerPayload(String rsName, String walName, long timeStamp, String state, 032 long walLength) { 033 super(NamedQueueEvent.WAL_EVENT_TRACKER.getValue()); 034 this.rsName = rsName; 035 this.walName = walName; 036 this.timeStamp = timeStamp; 037 this.state = state; 038 this.walLength = walLength; 039 } 040 041 public String getRsName() { 042 return rsName; 043 } 044 045 public String getWalName() { 046 return walName; 047 } 048 049 public long getTimeStamp() { 050 return timeStamp; 051 } 052 053 public String getState() { 054 return state; 055 } 056 057 public long getWalLength() { 058 return walLength; 059 } 060 061 @Override 062 public String toString() { 063 StringBuilder sb = new StringBuilder(this.getClass().getSimpleName()); 064 sb.append("["); 065 sb.append("rsName=").append(rsName); 066 sb.append(", walName=").append(walName); 067 sb.append(", timeStamp=").append(timeStamp); 068 sb.append(", walState=").append(state); 069 sb.append(", walLength=").append(walLength); 070 sb.append("]"); 071 return sb.toString(); 072 } 073}