View Javadoc

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