001// Autogenerated Jamon proxy
002// /Users/peter.somogyi/Cloudera/repos/hbase-upstream/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/ServerMetricsTmpl.jamon
003
004package org.apache.hadoop.hbase.tmpl.regionserver;
005
006// 24, 1
007import java.util.*;
008// 25, 1
009import org.apache.hadoop.hbase.regionserver.HRegionServer;
010// 26, 1
011import org.apache.hadoop.hbase.ipc.MetricsHBaseServerWrapper;
012// 27, 1
013import org.apache.hadoop.hbase.regionserver.MetricsRegionServerWrapper;
014// 28, 1
015import org.apache.hadoop.hbase.util.Bytes;
016// 29, 1
017import org.apache.hadoop.hbase.HRegionInfo;
018// 30, 1
019import org.apache.hadoop.hbase.ServerName;
020// 31, 1
021import org.apache.hadoop.hbase.HBaseConfiguration;
022// 32, 1
023import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
024// 33, 1
025import org.apache.hadoop.hbase.protobuf.generated.AdminProtos.ServerInfo;
026// 34, 1
027import org.apache.hadoop.hbase.protobuf.generated.ClusterStatusProtos.RegionLoad;
028// 35, 1
029import org.apache.hadoop.hbase.util.DirectMemoryUtils;
030// 36, 1
031import org.apache.hadoop.util.StringUtils.TraditionalBinaryPrefix;
032// 37, 1
033import java.lang.management.MemoryUsage;
034// 38, 1
035import org.apache.hadoop.hbase.io.util.MemorySizeUtil;
036
037@org.jamon.annotations.Template(
038  signature = "B9C61EF1325C0BBC55600C5CBC6C51A0",
039  requiredArguments = {
040    @org.jamon.annotations.Argument(name = "mWrap", type = "MetricsRegionServerWrapper"),
041    @org.jamon.annotations.Argument(name = "mServerWrap", type = "MetricsHBaseServerWrapper")})
042public class ServerMetricsTmpl
043  extends org.jamon.AbstractTemplateProxy
044{
045  
046  public ServerMetricsTmpl(org.jamon.TemplateManager p_manager)
047  {
048     super(p_manager);
049  }
050  
051  protected ServerMetricsTmpl(String p_path)
052  {
053    super(p_path);
054  }
055  
056  public ServerMetricsTmpl()
057  {
058     super("/org/apache/hadoop/hbase/tmpl/regionserver/ServerMetricsTmpl");
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, 1
072    public void setMWrap(MetricsRegionServerWrapper mWrap)
073    {
074      // 20, 1
075      m_mWrap = mWrap;
076    }
077    public MetricsRegionServerWrapper getMWrap()
078    {
079      return m_mWrap;
080    }
081    private MetricsRegionServerWrapper m_mWrap;
082    // 21, 1
083    public void setMServerWrap(MetricsHBaseServerWrapper mServerWrap)
084    {
085      // 21, 1
086      m_mServerWrap = mServerWrap;
087    }
088    public MetricsHBaseServerWrapper getMServerWrap()
089    {
090      return m_mServerWrap;
091    }
092    private MetricsHBaseServerWrapper m_mServerWrap;
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 ServerMetricsTmplImpl(getTemplateManager(), getImplData());
126  }
127  public org.jamon.Renderer makeRenderer(final MetricsRegionServerWrapper mWrap, final MetricsHBaseServerWrapper mServerWrap)
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, mWrap, mServerWrap);
135      }
136    };
137  }
138  
139  public void render(final java.io.Writer jamonWriter, final MetricsRegionServerWrapper mWrap, final MetricsHBaseServerWrapper mServerWrap)
140    throws java.io.IOException
141  {
142    renderNoFlush(jamonWriter, mWrap, mServerWrap);
143    jamonWriter.flush();
144  }
145  public void renderNoFlush(final java.io.Writer jamonWriter, final MetricsRegionServerWrapper mWrap, final MetricsHBaseServerWrapper mServerWrap)
146    throws java.io.IOException
147  {
148    ImplData implData = getImplData();
149    implData.setMWrap(mWrap);
150    implData.setMServerWrap(mServerWrap);
151    Intf instance = (Intf) getTemplateManager().constructImpl(this);
152    instance.renderNoFlush(jamonWriter);
153    reset();
154  }
155  
156  
157}