View Javadoc

1   // Autogenerated Jamon proxy
2   // /Users/stack/checkouts/hbase.git/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheViewTmpl.jamon
3   
4   package org.apache.hadoop.hbase.tmpl.regionserver;
5   
6   // 28, 1
7   import java.util.*;
8   // 29, 1
9   import org.apache.hadoop.conf.Configuration;
10  // 30, 1
11  import org.apache.hadoop.hbase.io.hfile.BlockCacheUtil.CachedBlocksByFile;
12  // 31, 1
13  import org.apache.hadoop.hbase.io.hfile.BlockCacheUtil;
14  // 32, 1
15  import org.apache.hadoop.hbase.io.hfile.CachedBlock;
16  // 33, 1
17  import org.apache.hadoop.hbase.io.hfile.CacheConfig;
18  // 34, 1
19  import org.apache.hadoop.hbase.io.hfile.BlockCache;
20  // 35, 1
21  import org.apache.hadoop.hbase.io.hfile.bucket.BucketCacheStats;
22  // 36, 1
23  import org.apache.hadoop.hbase.io.hfile.bucket.BucketCache;
24  // 37, 1
25  import org.apache.hadoop.hbase.io.hfile.bucket.BucketAllocator;
26  // 38, 1
27  import org.apache.hadoop.hbase.io.hfile.bucket.BucketAllocator.Bucket;
28  // 39, 1
29  import org.apache.hadoop.util.StringUtils;
30  // 40, 1
31  import com.yammer.metrics.stats.Snapshot;
32  
33  @org.jamon.annotations.Template(
34    signature = "95C3D36942FE38FFB173E11E1B54D0B2",
35    requiredArguments = {
36      @org.jamon.annotations.Argument(name = "cacheConfig", type = "CacheConfig"),
37      @org.jamon.annotations.Argument(name = "conf", type = "Configuration"),
38      @org.jamon.annotations.Argument(name = "bcn", type = "String"),
39      @org.jamon.annotations.Argument(name = "bcv", type = "String")})
40  public class BlockCacheViewTmpl
41    extends org.jamon.AbstractTemplateProxy
42  {
43    
44    public BlockCacheViewTmpl(org.jamon.TemplateManager p_manager)
45    {
46       super(p_manager);
47    }
48    
49    protected BlockCacheViewTmpl(String p_path)
50    {
51      super(p_path);
52    }
53    
54    public BlockCacheViewTmpl()
55    {
56       super("/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheViewTmpl");
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      // 22, 1
70      public void setCacheConfig(CacheConfig cacheConfig)
71      {
72        // 22, 1
73        m_cacheConfig = cacheConfig;
74      }
75      public CacheConfig getCacheConfig()
76      {
77        return m_cacheConfig;
78      }
79      private CacheConfig m_cacheConfig;
80      // 23, 1
81      public void setConf(Configuration conf)
82      {
83        // 23, 1
84        m_conf = conf;
85      }
86      public Configuration getConf()
87      {
88        return m_conf;
89      }
90      private Configuration m_conf;
91      // 24, 1
92      public void setBcn(String bcn)
93      {
94        // 24, 1
95        m_bcn = bcn;
96      }
97      public String getBcn()
98      {
99        return m_bcn;
100     }
101     private String m_bcn;
102     // 25, 1
103     public void setBcv(String bcv)
104     {
105       // 25, 1
106       m_bcv = bcv;
107     }
108     public String getBcv()
109     {
110       return m_bcv;
111     }
112     private String m_bcv;
113   }
114   @Override
115   protected org.jamon.AbstractTemplateProxy.ImplData makeImplData()
116   {
117     return new ImplData();
118   }
119   @Override public ImplData getImplData()
120   {
121     return (ImplData) super.getImplData();
122   }
123   
124   
125   @Override
126   public org.jamon.AbstractTemplateImpl constructImpl(Class<? extends org.jamon.AbstractTemplateImpl> p_class){
127     try
128     {
129       return p_class
130         .getConstructor(new Class [] { org.jamon.TemplateManager.class, ImplData.class })
131         .newInstance(new Object [] { getTemplateManager(), getImplData()});
132     }
133     catch (RuntimeException e)
134     {
135       throw e;
136     }
137     catch (Exception e)
138     {
139       throw new RuntimeException(e);
140     }
141   }
142   
143   @Override
144   protected org.jamon.AbstractTemplateImpl constructImpl(){
145     return new BlockCacheViewTmplImpl(getTemplateManager(), getImplData());
146   }
147   public org.jamon.Renderer makeRenderer(final CacheConfig cacheConfig, final Configuration conf, final String bcn, final String bcv)
148   {
149     return new org.jamon.AbstractRenderer() {
150       @Override
151       public void renderTo(final java.io.Writer jamonWriter)
152         throws java.io.IOException
153       {
154         render(jamonWriter, cacheConfig, conf, bcn, bcv);
155       }
156     };
157   }
158   
159   public void render(final java.io.Writer jamonWriter, final CacheConfig cacheConfig, final Configuration conf, final String bcn, final String bcv)
160     throws java.io.IOException
161   {
162     renderNoFlush(jamonWriter, cacheConfig, conf, bcn, bcv);
163     jamonWriter.flush();
164   }
165   public void renderNoFlush(final java.io.Writer jamonWriter, final CacheConfig cacheConfig, final Configuration conf, final String bcn, final String bcv)
166     throws java.io.IOException
167   {
168     ImplData implData = getImplData();
169     implData.setCacheConfig(cacheConfig);
170     implData.setConf(conf);
171     implData.setBcn(bcn);
172     implData.setBcv(bcv);
173     Intf instance = (Intf) getTemplateManager().constructImpl(this);
174     instance.renderNoFlush(jamonWriter);
175     reset();
176   }
177   
178   
179 }