View Javadoc

1   // Autogenerated Jamon proxy
2   // /jenkins/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;
32  // 37, 1
33  import com.codahale.metrics.Snapshot;
34  // 38, 1
35  import java.lang.management.ManagementFactory;
36  
37  @org.jamon.annotations.Template(
38    signature = "B9C61EF1325C0BBC55600C5CBC6C51A0",
39    requiredArguments = {
40      @org.jamon.annotations.Argument(name = "mWrap", type = "MetricsRegionServerWrapper"),
41      @org.jamon.annotations.Argument(name = "mServerWrap", type = "MetricsHBaseServerWrapper")})
42  public class ServerMetricsTmpl
43    extends org.jamon.AbstractTemplateProxy
44  {
45    
46    public ServerMetricsTmpl(org.jamon.TemplateManager p_manager)
47    {
48       super(p_manager);
49    }
50    
51    protected ServerMetricsTmpl(String p_path)
52    {
53      super(p_path);
54    }
55    
56    public ServerMetricsTmpl()
57    {
58       super("/org/apache/hadoop/hbase/tmpl/regionserver/ServerMetricsTmpl");
59    }
60    
61    public interface Intf
62      extends org.jamon.AbstractTemplateProxy.Intf
63    {
64      
65      void renderNoFlush(final java.io.Writer jamonWriter) throws java.io.IOException;
66      
67    }
68    public static class ImplData
69      extends org.jamon.AbstractTemplateProxy.ImplData
70    {
71      // 20, 1
72      public void setMWrap(MetricsRegionServerWrapper mWrap)
73      {
74        // 20, 1
75        m_mWrap = mWrap;
76      }
77      public MetricsRegionServerWrapper getMWrap()
78      {
79        return m_mWrap;
80      }
81      private MetricsRegionServerWrapper m_mWrap;
82      // 21, 1
83      public void setMServerWrap(MetricsHBaseServerWrapper mServerWrap)
84      {
85        // 21, 1
86        m_mServerWrap = mServerWrap;
87      }
88      public MetricsHBaseServerWrapper getMServerWrap()
89      {
90        return m_mServerWrap;
91      }
92      private MetricsHBaseServerWrapper m_mServerWrap;
93    }
94    @Override
95    protected org.jamon.AbstractTemplateProxy.ImplData makeImplData()
96    {
97      return new ImplData();
98    }
99    @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 }