001/* 002 * 003 * Licensed to the Apache Software Foundation (ASF) under one 004 * or more contributor license agreements. See the NOTICE file 005 * distributed with this work for additional information 006 * regarding copyright ownership. The ASF licenses this file 007 * to you under the Apache License, Version 2.0 (the 008 * "License"); you may not use this file except in compliance 009 * with the License. You may obtain a copy of the License at 010 * 011 * http://www.apache.org/licenses/LICENSE-2.0 012 * 013 * Unless required by applicable law or agreed to in writing, software 014 * distributed under the License is distributed on an "AS IS" BASIS, 015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 016 * See the License for the specific language governing permissions and 017 * limitations under the License. 018 */ 019 020package org.apache.hadoop.hbase.namequeues.response; 021 022import org.apache.commons.lang3.builder.ToStringBuilder; 023import org.apache.hadoop.hbase.namequeues.NamedQueuePayload; 024import org.apache.hadoop.hbase.shaded.protobuf.generated.RecentLogs; 025import org.apache.hadoop.hbase.shaded.protobuf.generated.TooSlowLog; 026import org.apache.yetus.audience.InterfaceAudience; 027import java.util.List; 028 029/** 030 * Response object to be sent by namedQueue service back to caller 031 */ 032@InterfaceAudience.Private 033public class NamedQueueGetResponse { 034 035 private List<TooSlowLog.SlowLogPayload> slowLogPayloads; 036 private List<RecentLogs.BalancerDecision> balancerDecisions; 037 private NamedQueuePayload.NamedQueueEvent namedQueueEvent; 038 039 public List<TooSlowLog.SlowLogPayload> getSlowLogPayloads() { 040 return slowLogPayloads; 041 } 042 043 public void setSlowLogPayloads(List<TooSlowLog.SlowLogPayload> slowLogPayloads) { 044 this.slowLogPayloads = slowLogPayloads; 045 } 046 047 public List<RecentLogs.BalancerDecision> getBalancerDecisions() { 048 return balancerDecisions; 049 } 050 051 public void setBalancerDecisions(List<RecentLogs.BalancerDecision> balancerDecisions) { 052 this.balancerDecisions = balancerDecisions; 053 } 054 055 public NamedQueuePayload.NamedQueueEvent getNamedQueueEvent() { 056 return namedQueueEvent; 057 } 058 059 public void setNamedQueueEvent(int eventOrdinal) { 060 this.namedQueueEvent = NamedQueuePayload.NamedQueueEvent.getEventByOrdinal(eventOrdinal); 061 } 062 063 @Override 064 public String toString() { 065 return new ToStringBuilder(this) 066 .append("slowLogPayloads", slowLogPayloads) 067 .append("balancerDecisions", balancerDecisions) 068 .append("namedQueueEvent", namedQueueEvent) 069 .toString(); 070 } 071 072}