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/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  // 36, 9
31  import org.apache.hadoop.util.StringUtils.TraditionalBinaryPrefix;
32  
33  @org.jamon.annotations.Template(
34    signature = "D8770EAE22E910DF1AF0A047A02547E9",
35    requiredArguments = {
36      @org.jamon.annotations.Argument(name = "regionServer", type = "HRegionServer"),
37      @org.jamon.annotations.Argument(name = "onlineRegions", type = "List<HRegionInfo>")})
38  public class RegionListTmpl
39    extends org.jamon.AbstractTemplateProxy
40  {
41    
42    public RegionListTmpl(org.jamon.TemplateManager p_manager)
43    {
44       super(p_manager);
45    }
46    
47    protected RegionListTmpl(String p_path)
48    {
49      super(p_path);
50    }
51    
52    public RegionListTmpl()
53    {
54       super("/org/apache/hadoop/hbase/tmpl/regionserver/RegionListTmpl");
55    }
56    
57    public interface Intf
58      extends org.jamon.AbstractTemplateProxy.Intf
59    {
60      
61      void renderNoFlush(final java.io.Writer jamonWriter) throws java.io.IOException;
62      
63    }
64    public static class ImplData
65      extends org.jamon.AbstractTemplateProxy.ImplData
66    {
67      // 20, 9
68      public void setRegionServer(HRegionServer regionServer)
69      {
70        // 20, 9
71        m_regionServer = regionServer;
72      }
73      public HRegionServer getRegionServer()
74      {
75        return m_regionServer;
76      }
77      private HRegionServer m_regionServer;
78      // 21, 9
79      public void setOnlineRegions(List<HRegionInfo> onlineRegions)
80      {
81        // 21, 9
82        m_onlineRegions = onlineRegions;
83      }
84      public List<HRegionInfo> getOnlineRegions()
85      {
86        return m_onlineRegions;
87      }
88      private List<HRegionInfo> m_onlineRegions;
89    }
90    @Override
91    protected org.jamon.AbstractTemplateProxy.ImplData makeImplData()
92    {
93      return new ImplData();
94    }
95    @Override public ImplData getImplData()
96    {
97      return (ImplData) super.getImplData();
98    }
99    
100   
101   @Override
102   public org.jamon.AbstractTemplateImpl constructImpl(Class<? extends org.jamon.AbstractTemplateImpl> p_class){
103     try
104     {
105       return p_class
106         .getConstructor(new Class [] { org.jamon.TemplateManager.class, ImplData.class })
107         .newInstance(new Object [] { getTemplateManager(), getImplData()});
108     }
109     catch (RuntimeException e)
110     {
111       throw e;
112     }
113     catch (Exception e)
114     {
115       throw new RuntimeException(e);
116     }
117   }
118   
119   @Override
120   protected org.jamon.AbstractTemplateImpl constructImpl(){
121     return new RegionListTmplImpl(getTemplateManager(), getImplData());
122   }
123   public org.jamon.Renderer makeRenderer(final HRegionServer regionServer, final List<HRegionInfo> onlineRegions)
124   {
125     return new org.jamon.AbstractRenderer() {
126       @Override
127       public void renderTo(final java.io.Writer jamonWriter)
128         throws java.io.IOException
129       {
130         render(jamonWriter, regionServer, onlineRegions);
131       }
132     };
133   }
134   
135   public void render(final java.io.Writer jamonWriter, final HRegionServer regionServer, final List<HRegionInfo> onlineRegions)
136     throws java.io.IOException
137   {
138     renderNoFlush(jamonWriter, regionServer, onlineRegions);
139     jamonWriter.flush();
140   }
141   public void renderNoFlush(final java.io.Writer jamonWriter, final HRegionServer regionServer, final List<HRegionInfo> onlineRegions)
142     throws java.io.IOException
143   {
144     ImplData implData = getImplData();
145     implData.setRegionServer(regionServer);
146     implData.setOnlineRegions(onlineRegions);
147     Intf instance = (Intf) getTemplateManager().constructImpl(this);
148     instance.renderNoFlush(jamonWriter);
149     reset();
150   }
151   
152   
153 }