org.apache.hadoop.hbase.tmpl.regionserver.BlockCacheTmpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hbase-server Show documentation
Show all versions of hbase-server Show documentation
Server functionality for HBase
// Autogenerated Jamon proxy
// /home/apurtell/tmp/RM/hbase/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheTmpl.jamon
package org.apache.hadoop.hbase.tmpl.regionserver;
// 32, 1
import java.util.Map;
// 33, 1
import org.apache.hadoop.hbase.io.hfile.BlockCacheUtil;
// 34, 1
import org.apache.hadoop.hbase.io.hfile.BlockCacheUtil.CachedBlocksByFile;
// 35, 1
import org.apache.hadoop.hbase.io.hfile.AgeSnapshot;
// 36, 1
import org.apache.hadoop.hbase.io.hfile.CachedBlock;
// 37, 1
import org.apache.hadoop.conf.Configuration;
// 38, 1
import org.apache.hadoop.hbase.io.hfile.CacheConfig;
// 39, 1
import org.apache.hadoop.hbase.io.hfile.BlockCache;
// 40, 1
import org.apache.hadoop.hbase.io.hfile.bucket.BucketCacheStats;
// 41, 1
import org.apache.hadoop.hbase.io.hfile.bucket.BucketCache;
// 42, 1
import org.apache.hadoop.hbase.io.hfile.bucket.BucketAllocator;
// 43, 1
import org.apache.hadoop.hbase.io.hfile.bucket.BucketAllocator.Bucket;
// 44, 1
import org.apache.hadoop.util.StringUtils.TraditionalBinaryPrefix;
@org.jamon.annotations.Template(
signature = "49FEC4D9194EC6D65E2CFEAF827B91C3",
requiredArguments = {
@org.jamon.annotations.Argument(name = "cacheConfig", type = "CacheConfig"),
@org.jamon.annotations.Argument(name = "config", type = "Configuration"),
@org.jamon.annotations.Argument(name = "bc", type = "BlockCache")})
public class BlockCacheTmpl
extends org.jamon.AbstractTemplateProxy
{
public BlockCacheTmpl(org.jamon.TemplateManager p_manager)
{
super(p_manager);
}
protected BlockCacheTmpl(String p_path)
{
super(p_path);
}
public BlockCacheTmpl()
{
super("/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheTmpl");
}
public interface Intf
extends org.jamon.AbstractTemplateProxy.Intf
{
void renderNoFlush(final java.io.Writer jamonWriter) throws java.io.IOException;
}
public static class ImplData
extends org.jamon.AbstractTemplateProxy.ImplData
{
// 21, 1
public void setCacheConfig(CacheConfig cacheConfig)
{
// 21, 1
m_cacheConfig = cacheConfig;
}
public CacheConfig getCacheConfig()
{
return m_cacheConfig;
}
private CacheConfig m_cacheConfig;
// 22, 1
public void setConfig(Configuration config)
{
// 22, 1
m_config = config;
}
public Configuration getConfig()
{
return m_config;
}
private Configuration m_config;
// 23, 1
public void setBc(BlockCache bc)
{
// 23, 1
m_bc = bc;
}
public BlockCache getBc()
{
return m_bc;
}
private BlockCache m_bc;
}
@Override
protected org.jamon.AbstractTemplateProxy.ImplData makeImplData()
{
return new ImplData();
}
@Override public ImplData getImplData()
{
return (ImplData) super.getImplData();
}
@Override
public org.jamon.AbstractTemplateImpl constructImpl(Class extends org.jamon.AbstractTemplateImpl> p_class){
try
{
return p_class
.getConstructor(new Class [] { org.jamon.TemplateManager.class, ImplData.class })
.newInstance(new Object [] { getTemplateManager(), getImplData()});
}
catch (RuntimeException e)
{
throw e;
}
catch (Exception e)
{
throw new RuntimeException(e);
}
}
@Override
protected org.jamon.AbstractTemplateImpl constructImpl(){
return new BlockCacheTmplImpl(getTemplateManager(), getImplData());
}
public org.jamon.Renderer makeRenderer(final CacheConfig cacheConfig, final Configuration config, final BlockCache bc)
{
return new org.jamon.AbstractRenderer() {
@Override
public void renderTo(final java.io.Writer jamonWriter)
throws java.io.IOException
{
render(jamonWriter, cacheConfig, config, bc);
}
};
}
public void render(final java.io.Writer jamonWriter, final CacheConfig cacheConfig, final Configuration config, final BlockCache bc)
throws java.io.IOException
{
renderNoFlush(jamonWriter, cacheConfig, config, bc);
jamonWriter.flush();
}
public void renderNoFlush(final java.io.Writer jamonWriter, final CacheConfig cacheConfig, final Configuration config, final BlockCache bc)
throws java.io.IOException
{
ImplData implData = getImplData();
implData.setCacheConfig(cacheConfig);
implData.setConfig(config);
implData.setBc(bc);
Intf instance = (Intf) getTemplateManager().constructImpl(this);
instance.renderNoFlush(jamonWriter);
reset();
}
}