001// Autogenerated Jamon proxy
002// /home/vagrant/repos/hbase/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheTmpl.jamon
003
004package org.apache.hadoop.hbase.tmpl.regionserver;
005
006// 32, 1
007import java.util.Map;
008// 33, 1
009import org.apache.hadoop.hbase.io.hfile.BlockCacheUtil.CachedBlocksByFile;
010// 34, 1
011import org.apache.hadoop.hbase.io.hfile.AgeSnapshot;
012// 35, 1
013import org.apache.hadoop.hbase.io.hfile.CachedBlock;
014// 36, 1
015import org.apache.hadoop.conf.Configuration;
016// 37, 1
017import org.apache.hadoop.hbase.io.hfile.CacheConfig;
018// 38, 1
019import org.apache.hadoop.hbase.io.hfile.BlockCache;
020// 39, 1
021import org.apache.hadoop.hbase.io.hfile.bucket.BucketCacheStats;
022// 40, 1
023import org.apache.hadoop.hbase.io.hfile.bucket.BucketCache;
024// 41, 1
025import org.apache.hadoop.hbase.io.hfile.bucket.BucketAllocator;
026// 42, 1
027import org.apache.hadoop.hbase.io.hfile.bucket.BucketAllocator.Bucket;
028// 43, 1
029import org.apache.hadoop.util.StringUtils.TraditionalBinaryPrefix;
030
031@org.jamon.annotations.Template(
032  signature = "49FEC4D9194EC6D65E2CFEAF827B91C3",
033  requiredArguments = {
034    @org.jamon.annotations.Argument(name = "cacheConfig", type = "CacheConfig"),
035    @org.jamon.annotations.Argument(name = "config", type = "Configuration"),
036    @org.jamon.annotations.Argument(name = "bc", type = "BlockCache")})
037public class BlockCacheTmpl
038  extends org.jamon.AbstractTemplateProxy
039{
040  
041  public BlockCacheTmpl(org.jamon.TemplateManager p_manager)
042  {
043     super(p_manager);
044  }
045  
046  protected BlockCacheTmpl(String p_path)
047  {
048    super(p_path);
049  }
050  
051  public BlockCacheTmpl()
052  {
053     super("/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheTmpl");
054  }
055  
056  public interface Intf
057    extends org.jamon.AbstractTemplateProxy.Intf
058  {
059    
060    void renderNoFlush(final java.io.Writer jamonWriter) throws java.io.IOException;
061    
062  }
063  public static class ImplData
064    extends org.jamon.AbstractTemplateProxy.ImplData
065  {
066    // 21, 1
067    public void setCacheConfig(CacheConfig cacheConfig)
068    {
069      // 21, 1
070      m_cacheConfig = cacheConfig;
071    }
072    public CacheConfig getCacheConfig()
073    {
074      return m_cacheConfig;
075    }
076    private CacheConfig m_cacheConfig;
077    // 22, 1
078    public void setConfig(Configuration config)
079    {
080      // 22, 1
081      m_config = config;
082    }
083    public Configuration getConfig()
084    {
085      return m_config;
086    }
087    private Configuration m_config;
088    // 23, 1
089    public void setBc(BlockCache bc)
090    {
091      // 23, 1
092      m_bc = bc;
093    }
094    public BlockCache getBc()
095    {
096      return m_bc;
097    }
098    private BlockCache m_bc;
099  }
100  @Override
101  protected org.jamon.AbstractTemplateProxy.ImplData makeImplData()
102  {
103    return new ImplData();
104  }
105  @Override public ImplData getImplData()
106  {
107    return (ImplData) super.getImplData();
108  }
109  
110  
111  @Override
112  public org.jamon.AbstractTemplateImpl constructImpl(Class<? extends org.jamon.AbstractTemplateImpl> p_class){
113    try
114    {
115      return p_class
116        .getConstructor(new Class [] { org.jamon.TemplateManager.class, ImplData.class })
117        .newInstance(new Object [] { getTemplateManager(), getImplData()});
118    }
119    catch (RuntimeException e)
120    {
121      throw e;
122    }
123    catch (Exception e)
124    {
125      throw new RuntimeException(e);
126    }
127  }
128  
129  @Override
130  protected org.jamon.AbstractTemplateImpl constructImpl(){
131    return new BlockCacheTmplImpl(getTemplateManager(), getImplData());
132  }
133  public org.jamon.Renderer makeRenderer(final CacheConfig cacheConfig, final Configuration config, final BlockCache bc)
134  {
135    return new org.jamon.AbstractRenderer() {
136      @Override
137      public void renderTo(final java.io.Writer jamonWriter)
138        throws java.io.IOException
139      {
140        render(jamonWriter, cacheConfig, config, bc);
141      }
142    };
143  }
144  
145  public void render(final java.io.Writer jamonWriter, final CacheConfig cacheConfig, final Configuration config, final BlockCache bc)
146    throws java.io.IOException
147  {
148    renderNoFlush(jamonWriter, cacheConfig, config, bc);
149    jamonWriter.flush();
150  }
151  public void renderNoFlush(final java.io.Writer jamonWriter, final CacheConfig cacheConfig, final Configuration config, final BlockCache bc)
152    throws java.io.IOException
153  {
154    ImplData implData = getImplData();
155    implData.setCacheConfig(cacheConfig);
156    implData.setConfig(config);
157    implData.setBc(bc);
158    Intf instance = (Intf) getTemplateManager().constructImpl(this);
159    instance.renderNoFlush(jamonWriter);
160    reset();
161  }
162  
163  
164}