View Javadoc

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