View Javadoc

1   // Autogenerated Jamon proxy
2   // /home/jenkins/jenkins-slave/workspace/hbase_generate_website/hbase/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/ServerMetricsTmpl.jamon
3   
4   package org.apache.hadoop.hbase.tmpl.regionserver;
5   
6   // 24, 1
7   import java.util.*;
8   // 25, 1
9   import org.apache.hadoop.hbase.regionserver.HRegionServer;
10  // 26, 1
11  import org.apache.hadoop.hbase.ipc.MetricsHBaseServerWrapper;
12  // 27, 1
13  import org.apache.hadoop.hbase.regionserver.MetricsRegionServerWrapper;
14  // 28, 1
15  import org.apache.hadoop.hbase.util.Bytes;
16  // 29, 1
17  import org.apache.hadoop.hbase.HRegionInfo;
18  // 30, 1
19  import org.apache.hadoop.hbase.ServerName;
20  // 31, 1
21  import org.apache.hadoop.hbase.HBaseConfiguration;
22  // 32, 1
23  import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
24  // 33, 1
25  import org.apache.hadoop.hbase.protobuf.generated.AdminProtos.ServerInfo;
26  // 34, 1
27  import org.apache.hadoop.hbase.protobuf.generated.ClusterStatusProtos.RegionLoad;
28  // 35, 1
29  import org.apache.hadoop.hbase.util.DirectMemoryUtils;
30  // 36, 1
31  import org.apache.hadoop.util.StringUtils.TraditionalBinaryPrefix;
32  // 37, 1
33  import java.lang.management.ManagementFactory;
34  
35  @org.jamon.annotations.Template(
36    signature = "B9C61EF1325C0BBC55600C5CBC6C51A0",
37    requiredArguments = {
38      @org.jamon.annotations.Argument(name = "mWrap", type = "MetricsRegionServerWrapper"),
39      @org.jamon.annotations.Argument(name = "mServerWrap", type = "MetricsHBaseServerWrapper")})
40  public class ServerMetricsTmpl
41    extends org.jamon.AbstractTemplateProxy
42  {
43    
44    public ServerMetricsTmpl(org.jamon.TemplateManager p_manager)
45    {
46       super(p_manager);
47    }
48    
49    protected ServerMetricsTmpl(String p_path)
50    {
51      super(p_path);
52    }
53    
54    public ServerMetricsTmpl()
55    {
56       super("/org/apache/hadoop/hbase/tmpl/regionserver/ServerMetricsTmpl");
57    }
58    
59    public interface Intf
60      extends org.jamon.AbstractTemplateProxy.Intf
61    {
62      
63      void renderNoFlush(final java.io.Writer jamonWriter) throws java.io.IOException;
64      
65    }
66    public static class ImplData
67      extends org.jamon.AbstractTemplateProxy.ImplData
68    {
69      // 20, 1
70      public void setMWrap(MetricsRegionServerWrapper mWrap)
71      {
72        // 20, 1
73        m_mWrap = mWrap;
74      }
75      public MetricsRegionServerWrapper getMWrap()
76      {
77        return m_mWrap;
78      }
79      private MetricsRegionServerWrapper m_mWrap;
80      // 21, 1
81      public void setMServerWrap(MetricsHBaseServerWrapper mServerWrap)
82      {
83        // 21, 1
84        m_mServerWrap = mServerWrap;
85      }
86      public MetricsHBaseServerWrapper getMServerWrap()
87      {
88        return m_mServerWrap;
89      }
90      private MetricsHBaseServerWrapper m_mServerWrap;
91    }
92    @Override
93    protected org.jamon.AbstractTemplateProxy.ImplData makeImplData()
94    {
95      return new ImplData();
96    }
97    @Override public ImplData getImplData()
98    {
99      return (ImplData) super.getImplData();
100   }
101   
102   
103   @Override
104   public org.jamon.AbstractTemplateImpl constructImpl(Class<? extends org.jamon.AbstractTemplateImpl> p_class){
105     try
106     {
107       return p_class
108         .getConstructor(new Class [] { org.jamon.TemplateManager.class, ImplData.class })
109         .newInstance(new Object [] { getTemplateManager(), getImplData()});
110     }
111     catch (RuntimeException e)
112     {
113       throw e;
114     }
115     catch (Exception e)
116     {
117       throw new RuntimeException(e);
118     }
119   }
120   
121   @Override
122   protected org.jamon.AbstractTemplateImpl constructImpl(){
123     return new ServerMetricsTmplImpl(getTemplateManager(), getImplData());
124   }
125   public org.jamon.Renderer makeRenderer(final MetricsRegionServerWrapper mWrap, final MetricsHBaseServerWrapper mServerWrap)
126   {
127     return new org.jamon.AbstractRenderer() {
128       @Override
129       public void renderTo(final java.io.Writer jamonWriter)
130         throws java.io.IOException
131       {
132         render(jamonWriter, mWrap, mServerWrap);
133       }
134     };
135   }
136   
137   public void render(final java.io.Writer jamonWriter, final MetricsRegionServerWrapper mWrap, final MetricsHBaseServerWrapper mServerWrap)
138     throws java.io.IOException
139   {
140     renderNoFlush(jamonWriter, mWrap, mServerWrap);
141     jamonWriter.flush();
142   }
143   public void renderNoFlush(final java.io.Writer jamonWriter, final MetricsRegionServerWrapper mWrap, final MetricsHBaseServerWrapper mServerWrap)
144     throws java.io.IOException
145   {
146     ImplData implData = getImplData();
147     implData.setMWrap(mWrap);
148     implData.setMServerWrap(mServerWrap);
149     Intf instance = (Intf) getTemplateManager().constructImpl(this);
150     instance.renderNoFlush(jamonWriter);
151     reset();
152   }
153   
154   
155 }