View Javadoc

1   // Autogenerated Jamon proxy
2   // /home/busbey/projects/hbase/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   // 37, 1
7   import java.util.Map;
8   // 38, 1
9   import org.apache.hadoop.hbase.io.hfile.BlockCacheUtil.CachedBlocksByFile;
10  // 39, 1
11  import org.apache.hadoop.hbase.io.hfile.AgeSnapshot;
12  // 40, 1
13  import org.apache.hadoop.hbase.io.hfile.CachedBlock;
14  // 41, 1
15  import org.apache.hadoop.conf.Configuration;
16  // 42, 1
17  import org.apache.hadoop.hbase.io.hfile.CacheConfig;
18  // 43, 1
19  import org.apache.hadoop.hbase.io.hfile.BlockCache;
20  // 44, 1
21  import org.apache.hadoop.hbase.io.hfile.bucket.BucketCacheStats;
22  // 45, 1
23  import org.apache.hadoop.hbase.io.hfile.bucket.BucketCache;
24  // 46, 1
25  import org.apache.hadoop.hbase.io.hfile.bucket.BucketAllocator;
26  // 47, 1
27  import org.apache.hadoop.hbase.io.hfile.bucket.BucketAllocator.Bucket;
28  // 48, 1
29  import org.apache.hadoop.util.StringUtils;
30  
31  @org.jamon.annotations.Template(
32    signature = "EE8BF9A7BD33760A0A8A22DB0A02AA1F",
33    requiredArguments = {
34      @org.jamon.annotations.Argument(name = "cacheConfig", type = "CacheConfig"),
35      @org.jamon.annotations.Argument(name = "config", type = "Configuration")})
36  public class BlockCacheTmpl
37    extends org.jamon.AbstractTemplateProxy
38  {
39    
40    public BlockCacheTmpl(org.jamon.TemplateManager p_manager)
41    {
42       super(p_manager);
43    }
44    
45    protected BlockCacheTmpl(String p_path)
46    {
47      super(p_path);
48    }
49    
50    public BlockCacheTmpl()
51    {
52       super("/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheTmpl");
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      // 21, 1
66      public void setCacheConfig(CacheConfig cacheConfig)
67      {
68        // 21, 1
69        m_cacheConfig = cacheConfig;
70      }
71      public CacheConfig getCacheConfig()
72      {
73        return m_cacheConfig;
74      }
75      private CacheConfig m_cacheConfig;
76      // 22, 1
77      public void setConfig(Configuration config)
78      {
79        // 22, 1
80        m_config = config;
81      }
82      public Configuration getConfig()
83      {
84        return m_config;
85      }
86      private Configuration m_config;
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 BlockCacheTmplImpl(getTemplateManager(), getImplData());
120   }
121   public org.jamon.Renderer makeRenderer(final CacheConfig cacheConfig, final Configuration config)
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, cacheConfig, config);
129       }
130     };
131   }
132   
133   public void render(final java.io.Writer jamonWriter, final CacheConfig cacheConfig, final Configuration config)
134     throws java.io.IOException
135   {
136     renderNoFlush(jamonWriter, cacheConfig, config);
137     jamonWriter.flush();
138   }
139   public void renderNoFlush(final java.io.Writer jamonWriter, final CacheConfig cacheConfig, final Configuration config)
140     throws java.io.IOException
141   {
142     ImplData implData = getImplData();
143     implData.setCacheConfig(cacheConfig);
144     implData.setConfig(config);
145     Intf instance = (Intf) getTemplateManager().constructImpl(this);
146     instance.renderNoFlush(jamonWriter);
147     reset();
148   }
149   
150   
151 }