View Javadoc

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