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