001// Autogenerated Jamon proxy
002// /Users/petersomogyi/projects/hbase-upstream/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheViewTmpl.jamon
003
004package org.apache.hadoop.hbase.tmpl.regionserver;
005
006// 29, 1
007import java.util.*;
008// 30, 1
009import org.apache.hadoop.conf.Configuration;
010// 31, 1
011import org.apache.hadoop.hbase.io.hfile.BlockCacheUtil.CachedBlocksByFile;
012// 32, 1
013import org.apache.hadoop.hbase.io.hfile.BlockCacheUtil;
014// 33, 1
015import org.apache.hadoop.hbase.io.hfile.CachedBlock;
016// 34, 1
017import org.apache.hadoop.hbase.io.hfile.CacheConfig;
018// 35, 1
019import org.apache.hadoop.hbase.io.hfile.BlockCache;
020// 36, 1
021import org.apache.hadoop.hbase.io.hfile.bucket.BucketCacheStats;
022// 37, 1
023import org.apache.hadoop.hbase.io.hfile.bucket.BucketCache;
024// 38, 1
025import org.apache.hadoop.hbase.io.hfile.bucket.BucketAllocator;
026// 39, 1
027import org.apache.hadoop.hbase.io.hfile.bucket.BucketAllocator.Bucket;
028// 40, 1
029import org.apache.hadoop.util.StringUtils;
030
031@org.jamon.annotations.Template(
032  signature = "8607856A6A21E19965FEE79E698134F8",
033  requiredArguments = {
034    @org.jamon.annotations.Argument(name = "cacheConfig", type = "CacheConfig"),
035    @org.jamon.annotations.Argument(name = "conf", type = "Configuration"),
036    @org.jamon.annotations.Argument(name = "bcn", type = "String"),
037    @org.jamon.annotations.Argument(name = "bcv", type = "String"),
038    @org.jamon.annotations.Argument(name = "blockCache", type = "BlockCache")})
039public class BlockCacheViewTmpl
040  extends org.jamon.AbstractTemplateProxy
041{
042  
043  public BlockCacheViewTmpl(org.jamon.TemplateManager p_manager)
044  {
045     super(p_manager);
046  }
047  
048  protected BlockCacheViewTmpl(String p_path)
049  {
050    super(p_path);
051  }
052  
053  public BlockCacheViewTmpl()
054  {
055     super("/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheViewTmpl");
056  }
057  
058  public interface Intf
059    extends org.jamon.AbstractTemplateProxy.Intf
060  {
061    
062    void renderNoFlush(final java.io.Writer jamonWriter) throws java.io.IOException;
063    
064  }
065  public static class ImplData
066    extends org.jamon.AbstractTemplateProxy.ImplData
067  {
068    // 22, 1
069    public void setCacheConfig(CacheConfig cacheConfig)
070    {
071      // 22, 1
072      m_cacheConfig = cacheConfig;
073    }
074    public CacheConfig getCacheConfig()
075    {
076      return m_cacheConfig;
077    }
078    private CacheConfig m_cacheConfig;
079    // 23, 1
080    public void setConf(Configuration conf)
081    {
082      // 23, 1
083      m_conf = conf;
084    }
085    public Configuration getConf()
086    {
087      return m_conf;
088    }
089    private Configuration m_conf;
090    // 24, 1
091    public void setBcn(String bcn)
092    {
093      // 24, 1
094      m_bcn = bcn;
095    }
096    public String getBcn()
097    {
098      return m_bcn;
099    }
100    private String m_bcn;
101    // 25, 1
102    public void setBcv(String bcv)
103    {
104      // 25, 1
105      m_bcv = bcv;
106    }
107    public String getBcv()
108    {
109      return m_bcv;
110    }
111    private String m_bcv;
112    // 26, 1
113    public void setBlockCache(BlockCache blockCache)
114    {
115      // 26, 1
116      m_blockCache = blockCache;
117    }
118    public BlockCache getBlockCache()
119    {
120      return m_blockCache;
121    }
122    private BlockCache m_blockCache;
123  }
124  @Override
125  protected org.jamon.AbstractTemplateProxy.ImplData makeImplData()
126  {
127    return new ImplData();
128  }
129  @Override public ImplData getImplData()
130  {
131    return (ImplData) super.getImplData();
132  }
133  
134  
135  @Override
136  public org.jamon.AbstractTemplateImpl constructImpl(Class<? extends org.jamon.AbstractTemplateImpl> p_class){
137    try
138    {
139      return p_class
140        .getConstructor(new Class [] { org.jamon.TemplateManager.class, ImplData.class })
141        .newInstance(new Object [] { getTemplateManager(), getImplData()});
142    }
143    catch (RuntimeException e)
144    {
145      throw e;
146    }
147    catch (Exception e)
148    {
149      throw new RuntimeException(e);
150    }
151  }
152  
153  @Override
154  protected org.jamon.AbstractTemplateImpl constructImpl(){
155    return new BlockCacheViewTmplImpl(getTemplateManager(), getImplData());
156  }
157  public org.jamon.Renderer makeRenderer(final CacheConfig cacheConfig, final Configuration conf, final String bcn, final String bcv, final BlockCache blockCache)
158  {
159    return new org.jamon.AbstractRenderer() {
160      @Override
161      public void renderTo(final java.io.Writer jamonWriter)
162        throws java.io.IOException
163      {
164        render(jamonWriter, cacheConfig, conf, bcn, bcv, blockCache);
165      }
166    };
167  }
168  
169  public void render(final java.io.Writer jamonWriter, final CacheConfig cacheConfig, final Configuration conf, final String bcn, final String bcv, final BlockCache blockCache)
170    throws java.io.IOException
171  {
172    renderNoFlush(jamonWriter, cacheConfig, conf, bcn, bcv, blockCache);
173    jamonWriter.flush();
174  }
175  public void renderNoFlush(final java.io.Writer jamonWriter, final CacheConfig cacheConfig, final Configuration conf, final String bcn, final String bcv, final BlockCache blockCache)
176    throws java.io.IOException
177  {
178    ImplData implData = getImplData();
179    implData.setCacheConfig(cacheConfig);
180    implData.setConf(conf);
181    implData.setBcn(bcn);
182    implData.setBcv(bcv);
183    implData.setBlockCache(blockCache);
184    Intf instance = (Intf) getTemplateManager().constructImpl(this);
185    instance.renderNoFlush(jamonWriter);
186    reset();
187  }
188  
189  
190}