View Javadoc

1   // Autogenerated Jamon proxy
2   // /Users/stack/checkouts/hbase.git/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheViewTmpl.jamon
3   
4   package org.apache.hadoop.hbase.tmpl.regionserver;
5   
6   // 28, 1
7   import java.util.*;
8   // 29, 1
9   import org.apache.hadoop.conf.Configuration;
10  // 30, 1
11  import org.apache.hadoop.hbase.io.hfile.BlockCacheUtil.CachedBlocksByFile;
12  // 31, 1
13  import org.apache.hadoop.hbase.io.hfile.BlockCacheUtil;
14  // 32, 1
15  import org.apache.hadoop.hbase.io.hfile.CachedBlock;
16  // 33, 1
17  import org.apache.hadoop.hbase.io.hfile.CacheConfig;
18  // 34, 1
19  import org.apache.hadoop.hbase.io.hfile.BlockCache;
20  // 35, 1
21  import org.apache.hadoop.hbase.io.hfile.bucket.BucketCacheStats;
22  // 36, 1
23  import org.apache.hadoop.hbase.io.hfile.bucket.BucketCache;
24  // 37, 1
25  import org.apache.hadoop.hbase.io.hfile.bucket.BucketAllocator;
26  // 38, 1
27  import org.apache.hadoop.hbase.io.hfile.bucket.BucketAllocator.Bucket;
28  // 39, 1
29  import org.apache.hadoop.util.StringUtils;
30  // 40, 1
31  import com.yammer.metrics.stats.Snapshot;
32  
33  @org.jamon.annotations.Template(
34    signature = "55F24C2DE80855032635C8D7EC699979",
35    requiredArguments = {
36      @org.jamon.annotations.Argument(name = "cacheConfig", type = "CacheConfig"),
37      @org.jamon.annotations.Argument(name = "conf", type = "Configuration"),
38      @org.jamon.annotations.Argument(name = "bcn", type = "String"),
39      @org.jamon.annotations.Argument(name = "bcv", type = "String")})
40  public class BlockCacheViewTmpl
41    extends org.jamon.AbstractTemplateProxy
42  {
43    
44    public BlockCacheViewTmpl(org.jamon.TemplateManager p_manager)
45    {
46       super(p_manager);
47    }
48    
49    public BlockCacheViewTmpl()
50    {
51       super("/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheViewTmpl");
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      // 22, 1
64      public void setCacheConfig(CacheConfig cacheConfig)
65      {
66        // 22, 1
67        m_cacheConfig = cacheConfig;
68      }
69      public CacheConfig getCacheConfig()
70      {
71        return m_cacheConfig;
72      }
73      private CacheConfig m_cacheConfig;
74      // 23, 1
75      public void setConf(Configuration conf)
76      {
77        // 23, 1
78        m_conf = conf;
79      }
80      public Configuration getConf()
81      {
82        return m_conf;
83      }
84      private Configuration m_conf;
85      // 24, 1
86      public void setBcn(String bcn)
87      {
88        // 24, 1
89        m_bcn = bcn;
90      }
91      public String getBcn()
92      {
93        return m_bcn;
94      }
95      private String m_bcn;
96      // 25, 1
97      public void setBcv(String bcv)
98      {
99        // 25, 1
100       m_bcv = bcv;
101     }
102     public String getBcv()
103     {
104       return m_bcv;
105     }
106     private String m_bcv;
107   }
108   @Override
109   protected ImplData makeImplData()
110   {
111     return new ImplData();
112   }
113   @Override @SuppressWarnings("unchecked") public ImplData getImplData()
114   {
115     return (ImplData) super.getImplData();
116   }
117   
118   
119   @Override
120   public org.jamon.AbstractTemplateImpl constructImpl(Class<? extends org.jamon.AbstractTemplateImpl> p_class){
121     try
122     {
123       return p_class
124         .getConstructor(new Class [] { org.jamon.TemplateManager.class, ImplData.class })
125         .newInstance(new Object [] { getTemplateManager(), getImplData()});
126     }
127     catch (RuntimeException e)
128     {
129       throw e;
130     }
131     catch (Exception e)
132     {
133       throw new RuntimeException(e);
134     }
135   }
136   
137   @Override
138   protected org.jamon.AbstractTemplateImpl constructImpl(){
139     return new BlockCacheViewTmplImpl(getTemplateManager(), getImplData());
140   }
141   public org.jamon.Renderer makeRenderer(final CacheConfig cacheConfig, final Configuration conf, final String bcn, final String bcv)
142   {
143     return new org.jamon.AbstractRenderer() {
144       @Override
145       public void renderTo(final java.io.Writer jamonWriter)
146         throws java.io.IOException
147       {
148         render(jamonWriter, cacheConfig, conf, bcn, bcv);
149       }
150     };
151   }
152   
153   public void render(final java.io.Writer jamonWriter, final CacheConfig cacheConfig, final Configuration conf, final String bcn, final String bcv)
154     throws java.io.IOException
155   {
156     renderNoFlush(jamonWriter, cacheConfig, conf, bcn, bcv);
157     jamonWriter.flush();
158   }
159   public void renderNoFlush(final java.io.Writer jamonWriter, final CacheConfig cacheConfig, final Configuration conf, final String bcn, final String bcv)
160     throws java.io.IOException
161   {
162     ImplData implData = getImplData();
163     implData.setCacheConfig(cacheConfig);
164     implData.setConf(conf);
165     implData.setBcn(bcn);
166     implData.setBcv(bcv);
167     Intf instance = (Intf) getTemplateManager().constructImpl(this);
168     instance.renderNoFlush(jamonWriter);
169     reset();
170   }
171   
172   
173 }