001// Autogenerated Jamon proxy
002// /Users/peter.somogyi/Cloudera/repos/hbase-upstream/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheTmpl.jamon
003
004package org.apache.hadoop.hbase.tmpl.regionserver;
005
006// 37, 1
007import java.util.Map;
008// 38, 1
009import org.apache.hadoop.hbase.io.hfile.BlockCacheUtil.CachedBlocksByFile;
010// 39, 1
011import org.apache.hadoop.hbase.io.hfile.AgeSnapshot;
012// 40, 1
013import org.apache.hadoop.hbase.io.hfile.CachedBlock;
014// 41, 1
015import org.apache.hadoop.conf.Configuration;
016// 42, 1
017import org.apache.hadoop.hbase.io.hfile.CacheConfig;
018// 43, 1
019import org.apache.hadoop.hbase.io.hfile.BlockCache;
020// 44, 1
021import org.apache.hadoop.hbase.io.hfile.bucket.BucketCacheStats;
022// 45, 1
023import org.apache.hadoop.hbase.io.hfile.bucket.BucketCache;
024// 46, 1
025import org.apache.hadoop.hbase.io.hfile.bucket.BucketAllocator;
026// 47, 1
027import org.apache.hadoop.hbase.io.hfile.bucket.BucketAllocator.Bucket;
028// 48, 1
029import org.apache.hadoop.util.StringUtils.TraditionalBinaryPrefix;
030
031@org.jamon.annotations.Template(
032  signature = "EE8BF9A7BD33760A0A8A22DB0A02AA1F",
033  requiredArguments = {
034    @org.jamon.annotations.Argument(name = "cacheConfig", type = "CacheConfig"),
035    @org.jamon.annotations.Argument(name = "config", type = "Configuration")})
036public class BlockCacheTmpl
037  extends org.jamon.AbstractTemplateProxy
038{
039  
040  public BlockCacheTmpl(org.jamon.TemplateManager p_manager)
041  {
042     super(p_manager);
043  }
044  
045  protected BlockCacheTmpl(String p_path)
046  {
047    super(p_path);
048  }
049  
050  public BlockCacheTmpl()
051  {
052     super("/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheTmpl");
053  }
054  
055  public interface Intf
056    extends org.jamon.AbstractTemplateProxy.Intf
057  {
058    
059    void renderNoFlush(final java.io.Writer jamonWriter) throws java.io.IOException;
060    
061  }
062  public static class ImplData
063    extends org.jamon.AbstractTemplateProxy.ImplData
064  {
065    // 21, 1
066    public void setCacheConfig(CacheConfig cacheConfig)
067    {
068      // 21, 1
069      m_cacheConfig = cacheConfig;
070    }
071    public CacheConfig getCacheConfig()
072    {
073      return m_cacheConfig;
074    }
075    private CacheConfig m_cacheConfig;
076    // 22, 1
077    public void setConfig(Configuration config)
078    {
079      // 22, 1
080      m_config = config;
081    }
082    public Configuration getConfig()
083    {
084      return m_config;
085    }
086    private Configuration m_config;
087  }
088  @Override
089  protected org.jamon.AbstractTemplateProxy.ImplData makeImplData()
090  {
091    return new ImplData();
092  }
093  @Override public ImplData getImplData()
094  {
095    return (ImplData) super.getImplData();
096  }
097  
098  
099  @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}