View Javadoc

1   // Autogenerated Jamon proxy
2   // /var/tmp/hbase-0.94.16/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/RSStatusTmpl.jamon
3   
4   package org.apache.hadoop.hbase.tmpl.regionserver;
5   
6   // 26, 1
7   import java.util.*;
8   // 27, 1
9   import java.io.IOException;
10  // 28, 1
11  import org.apache.hadoop.io.Text;
12  // 29, 1
13  import org.apache.hadoop.hbase.regionserver.HRegionServer;
14  // 30, 1
15  import org.apache.hadoop.hbase.regionserver.HRegion;
16  // 31, 1
17  import org.apache.hadoop.hbase.regionserver.metrics.RegionServerMetrics;
18  // 32, 1
19  import org.apache.hadoop.hbase.util.Bytes;
20  // 33, 1
21  import org.apache.hadoop.hbase.HConstants;
22  // 34, 1
23  import org.apache.hadoop.hbase.HServerInfo;
24  // 35, 1
25  import org.apache.hadoop.hbase.HServerLoad;
26  // 36, 1
27  import org.apache.hadoop.hbase.HRegionInfo;
28  // 37, 1
29  import org.apache.hadoop.hbase.ServerName;
30  // 38, 1
31  import org.apache.hadoop.hbase.HBaseConfiguration;
32  
33  @org.jamon.annotations.Template(
34    signature = "014216A979E1F203E0C4360C2CF5CF18",
35    requiredArguments = {
36      @org.jamon.annotations.Argument(name = "regionServer", type = "HRegionServer")},
37    optionalArguments = {
38      @org.jamon.annotations.Argument(name = "filter", type = "String"),
39      @org.jamon.annotations.Argument(name = "format", type = "String")})
40  public class RSStatusTmpl
41    extends org.jamon.AbstractTemplateProxy
42  {
43    
44    public RSStatusTmpl(org.jamon.TemplateManager p_manager)
45    {
46       super(p_manager);
47    }
48    
49    public RSStatusTmpl()
50    {
51       super("/org/apache/hadoop/hbase/tmpl/regionserver/RSStatusTmpl");
52    }
53    
54    protected interface Intf
55      extends org.jamon.AbstractTemplateProxy.Intf{
56      
57      void renderNoFlush(final java.io.Writer jamonWriter) throws java.io.IOException;
58      
59    }
60    public static class ImplData
61      extends org.jamon.AbstractTemplateProxy.ImplData
62    {
63      // 21, 1
64      public void setRegionServer(HRegionServer regionServer)
65      {
66        // 21, 1
67        m_regionServer = regionServer;
68      }
69      public HRegionServer getRegionServer()
70      {
71        return m_regionServer;
72      }
73      private HRegionServer m_regionServer;
74      // 22, 1
75      public void setFilter(String filter)
76      {
77        // 22, 1
78        m_filter = filter;
79        m_filter__IsNotDefault = true;
80      }
81      public String getFilter()
82      {
83        return m_filter;
84      }
85      private String m_filter;
86      public boolean getFilter__IsNotDefault()
87      {
88        return m_filter__IsNotDefault;
89      }
90      private boolean m_filter__IsNotDefault;
91      // 23, 1
92      public void setFormat(String format)
93      {
94        // 23, 1
95        m_format = format;
96        m_format__IsNotDefault = true;
97      }
98      public String getFormat()
99      {
100       return m_format;
101     }
102     private String m_format;
103     public boolean getFormat__IsNotDefault()
104     {
105       return m_format__IsNotDefault;
106     }
107     private boolean m_format__IsNotDefault;
108   }
109   @Override
110   protected ImplData makeImplData()
111   {
112     return new ImplData();
113   }
114   @Override @SuppressWarnings("unchecked") public ImplData getImplData()
115   {
116     return (ImplData) super.getImplData();
117   }
118   
119   protected String filter;
120   public final org.apache.hadoop.hbase.tmpl.regionserver.RSStatusTmpl setFilter(String p_filter)
121   {
122     (getImplData()).setFilter(p_filter);
123     return this;
124   }
125   
126   protected String format;
127   public final org.apache.hadoop.hbase.tmpl.regionserver.RSStatusTmpl setFormat(String p_format)
128   {
129     (getImplData()).setFormat(p_format);
130     return this;
131   }
132   
133   
134   @Override
135   public org.jamon.AbstractTemplateImpl constructImpl(Class<? extends org.jamon.AbstractTemplateImpl> p_class){
136     try
137     {
138       return p_class
139         .getConstructor(new Class [] { org.jamon.TemplateManager.class, ImplData.class })
140         .newInstance(new Object [] { getTemplateManager(), getImplData()});
141     }
142     catch (RuntimeException e)
143     {
144       throw e;
145     }
146     catch (Exception e)
147     {
148       throw new RuntimeException(e);
149     }
150   }
151   
152   @Override
153   protected org.jamon.AbstractTemplateImpl constructImpl(){
154     return new RSStatusTmplImpl(getTemplateManager(), getImplData());
155   }
156   public org.jamon.Renderer makeRenderer(final HRegionServer regionServer)
157   {
158     return new org.jamon.AbstractRenderer() {
159       @Override
160       public void renderTo(final java.io.Writer jamonWriter)
161         throws java.io.IOException
162       {
163         render(jamonWriter, regionServer);
164       }
165     };
166   }
167   
168   public void render(final java.io.Writer jamonWriter, final HRegionServer regionServer)
169     throws java.io.IOException
170   {
171     renderNoFlush(jamonWriter, regionServer);
172     jamonWriter.flush();
173   }
174   public void renderNoFlush(final java.io.Writer jamonWriter, final HRegionServer regionServer)
175     throws java.io.IOException
176   {
177     ImplData implData = getImplData();
178     implData.setRegionServer(regionServer);
179     Intf instance = (Intf) getTemplateManager().constructImpl(this);
180     instance.renderNoFlush(jamonWriter);
181     reset();
182   }
183   
184   
185 }