001// Autogenerated Jamon proxy
002// /home/vagrant/repos/hbase/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RegionListTmpl.jamon
003
004package org.apache.hadoop.hbase.tmpl.regionserver;
005
006// 24, 9
007import java.util.*;
008// 25, 9
009import org.apache.commons.lang3.time.FastDateFormat;
010// 26, 9
011import org.apache.hadoop.hbase.regionserver.HRegionServer;
012// 27, 9
013import org.apache.hadoop.hbase.util.Bytes;
014// 28, 9
015import org.apache.hadoop.hbase.client.RegionInfo;
016// 29, 9
017import org.apache.hadoop.hbase.client.RegionInfoDisplay;
018// 30, 9
019import org.apache.hadoop.hbase.regionserver.Region;
020// 31, 9
021import org.apache.hadoop.hbase.ServerName;
022// 32, 9
023import org.apache.hadoop.hbase.HBaseConfiguration;
024// 33, 9
025import org.apache.hadoop.hbase.shaded.protobuf.ProtobufUtil;
026// 34, 9
027import org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.ServerInfo;
028// 35, 9
029import org.apache.hadoop.hbase.shaded.protobuf.generated.ClusterStatusProtos.RegionLoad;
030// 36, 9
031import org.apache.hadoop.hbase.client.RegionReplicaUtil;
032// 37, 9
033import org.apache.hadoop.hbase.regionserver.MetricsRegionWrapper;
034// 38, 9
035import org.apache.hadoop.util.StringUtils.TraditionalBinaryPrefix;
036
037@org.jamon.annotations.Template(
038  signature = "7C408A6F85F95860CF3B07902F77D50D",
039  requiredArguments = {
040    @org.jamon.annotations.Argument(name = "regionServer", type = "HRegionServer"),
041    @org.jamon.annotations.Argument(name = "onlineRegions", type = "List<RegionInfo>")})
042public class RegionListTmpl
043  extends org.jamon.AbstractTemplateProxy
044{
045  
046  public RegionListTmpl(org.jamon.TemplateManager p_manager)
047  {
048     super(p_manager);
049  }
050  
051  protected RegionListTmpl(String p_path)
052  {
053    super(p_path);
054  }
055  
056  public RegionListTmpl()
057  {
058     super("/org/apache/hadoop/hbase/tmpl/regionserver/RegionListTmpl");
059  }
060  
061  public interface Intf
062    extends org.jamon.AbstractTemplateProxy.Intf
063  {
064    
065    void renderNoFlush(final java.io.Writer jamonWriter) throws java.io.IOException;
066    
067  }
068  public static class ImplData
069    extends org.jamon.AbstractTemplateProxy.ImplData
070  {
071    // 20, 9
072    public void setRegionServer(HRegionServer regionServer)
073    {
074      // 20, 9
075      m_regionServer = regionServer;
076    }
077    public HRegionServer getRegionServer()
078    {
079      return m_regionServer;
080    }
081    private HRegionServer m_regionServer;
082    // 21, 9
083    public void setOnlineRegions(List<RegionInfo> onlineRegions)
084    {
085      // 21, 9
086      m_onlineRegions = onlineRegions;
087    }
088    public List<RegionInfo> getOnlineRegions()
089    {
090      return m_onlineRegions;
091    }
092    private List<RegionInfo> m_onlineRegions;
093  }
094  @Override
095  protected org.jamon.AbstractTemplateProxy.ImplData makeImplData()
096  {
097    return new ImplData();
098  }
099  @Override public ImplData getImplData()
100  {
101    return (ImplData) super.getImplData();
102  }
103  
104  
105  @Override
106  public org.jamon.AbstractTemplateImpl constructImpl(Class<? extends org.jamon.AbstractTemplateImpl> p_class){
107    try
108    {
109      return p_class
110        .getConstructor(new Class [] { org.jamon.TemplateManager.class, ImplData.class })
111        .newInstance(new Object [] { getTemplateManager(), getImplData()});
112    }
113    catch (RuntimeException e)
114    {
115      throw e;
116    }
117    catch (Exception e)
118    {
119      throw new RuntimeException(e);
120    }
121  }
122  
123  @Override
124  protected org.jamon.AbstractTemplateImpl constructImpl(){
125    return new RegionListTmplImpl(getTemplateManager(), getImplData());
126  }
127  public org.jamon.Renderer makeRenderer(final HRegionServer regionServer, final List<RegionInfo> onlineRegions)
128  {
129    return new org.jamon.AbstractRenderer() {
130      @Override
131      public void renderTo(final java.io.Writer jamonWriter)
132        throws java.io.IOException
133      {
134        render(jamonWriter, regionServer, onlineRegions);
135      }
136    };
137  }
138  
139  public void render(final java.io.Writer jamonWriter, final HRegionServer regionServer, final List<RegionInfo> onlineRegions)
140    throws java.io.IOException
141  {
142    renderNoFlush(jamonWriter, regionServer, onlineRegions);
143    jamonWriter.flush();
144  }
145  public void renderNoFlush(final java.io.Writer jamonWriter, final HRegionServer regionServer, final List<RegionInfo> onlineRegions)
146    throws java.io.IOException
147  {
148    ImplData implData = getImplData();
149    implData.setRegionServer(regionServer);
150    implData.setOnlineRegions(onlineRegions);
151    Intf instance = (Intf) getTemplateManager().constructImpl(this);
152    instance.renderNoFlush(jamonWriter);
153    reset();
154  }
155  
156  
157}