View Javadoc

1   // Autogenerated Jamon proxy
2   // /home/apurtell/src/hbase/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheTmpl.jamon
3   
4   package org.apache.hadoop.hbase.tmpl.regionserver;
5   
6   // 35, 1
7   import java.util.Map;
8   // 36, 1
9   import org.apache.hadoop.hbase.io.hfile.BlockCacheUtil.CachedBlocksByFile;
10  // 37, 1
11  import org.apache.hadoop.hbase.io.hfile.BlockCacheUtil.AgeSnapshot;
12  // 38, 1
13  import org.apache.hadoop.hbase.io.hfile.CachedBlock;
14  // 39, 1
15  import org.apache.hadoop.conf.Configuration;
16  // 40, 1
17  import org.apache.hadoop.hbase.io.hfile.CacheConfig;
18  // 41, 1
19  import org.apache.hadoop.hbase.io.hfile.BlockCache;
20  // 42, 1
21  import org.apache.hadoop.hbase.io.hfile.bucket.BucketCacheStats;
22  // 43, 1
23  import org.apache.hadoop.hbase.io.hfile.bucket.BucketCache;
24  // 44, 1
25  import org.apache.hadoop.hbase.io.hfile.bucket.BucketAllocator;
26  // 45, 1
27  import org.apache.hadoop.hbase.io.hfile.bucket.BucketAllocator.Bucket;
28  // 46, 1
29  import org.apache.hadoop.hbase.io.hfile.slab.SlabCache;
30  // 47, 1
31  import org.apache.hadoop.hbase.io.hfile.slab.SingleSizeCache;
32  // 48, 1
33  import org.apache.hadoop.util.StringUtils;
34  
35  @org.jamon.annotations.Template(
36    signature = "EE8BF9A7BD33760A0A8A22DB0A02AA1F",
37    requiredArguments = {
38      @org.jamon.annotations.Argument(name = "cacheConfig", type = "CacheConfig"),
39      @org.jamon.annotations.Argument(name = "config", type = "Configuration")})
40  public class BlockCacheTmpl
41    extends org.jamon.AbstractTemplateProxy
42  {
43    
44    public BlockCacheTmpl(org.jamon.TemplateManager p_manager)
45    {
46       super(p_manager);
47    }
48    
49    protected BlockCacheTmpl(String p_path)
50    {
51      super(p_path);
52    }
53    
54    public BlockCacheTmpl()
55    {
56       super("/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheTmpl");
57    }
58    
59    public interface Intf
60      extends org.jamon.AbstractTemplateProxy.Intf
61    {
62      
63      void renderNoFlush(final java.io.Writer jamonWriter) throws java.io.IOException;
64      
65    }
66    public static class ImplData
67      extends org.jamon.AbstractTemplateProxy.ImplData
68    {
69      // 21, 1
70      public void setCacheConfig(CacheConfig cacheConfig)
71      {
72        // 21, 1
73        m_cacheConfig = cacheConfig;
74      }
75      public CacheConfig getCacheConfig()
76      {
77        return m_cacheConfig;
78      }
79      private CacheConfig m_cacheConfig;
80      // 22, 1
81      public void setConfig(Configuration config)
82      {
83        // 22, 1
84        m_config = config;
85      }
86      public Configuration getConfig()
87      {
88        return m_config;
89      }
90      private Configuration m_config;
91    }
92    @Override
93    protected org.jamon.AbstractTemplateProxy.ImplData makeImplData()
94    {
95      return new ImplData();
96    }
97    @Override public ImplData getImplData()
98    {
99      return (ImplData) super.getImplData();
100   }
101   
102   
103   @Override
104   public org.jamon.AbstractTemplateImpl constructImpl(Class<? extends org.jamon.AbstractTemplateImpl> p_class){
105     try
106     {
107       return p_class
108         .getConstructor(new Class [] { org.jamon.TemplateManager.class, ImplData.class })
109         .newInstance(new Object [] { getTemplateManager(), getImplData()});
110     }
111     catch (RuntimeException e)
112     {
113       throw e;
114     }
115     catch (Exception e)
116     {
117       throw new RuntimeException(e);
118     }
119   }
120   
121   @Override
122   protected org.jamon.AbstractTemplateImpl constructImpl(){
123     return new BlockCacheTmplImpl(getTemplateManager(), getImplData());
124   }
125   public org.jamon.Renderer makeRenderer(final CacheConfig cacheConfig, final Configuration config)
126   {
127     return new org.jamon.AbstractRenderer() {
128       @Override
129       public void renderTo(final java.io.Writer jamonWriter)
130         throws java.io.IOException
131       {
132         render(jamonWriter, cacheConfig, config);
133       }
134     };
135   }
136   
137   public void render(final java.io.Writer jamonWriter, final CacheConfig cacheConfig, final Configuration config)
138     throws java.io.IOException
139   {
140     renderNoFlush(jamonWriter, cacheConfig, config);
141     jamonWriter.flush();
142   }
143   public void renderNoFlush(final java.io.Writer jamonWriter, final CacheConfig cacheConfig, final Configuration config)
144     throws java.io.IOException
145   {
146     ImplData implData = getImplData();
147     implData.setCacheConfig(cacheConfig);
148     implData.setConfig(config);
149     Intf instance = (Intf) getTemplateManager().constructImpl(this);
150     instance.renderNoFlush(jamonWriter);
151     reset();
152   }
153   
154   
155 }