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
// /Users/sakthi/dev/hbase/hbase-server/src/main/jamon/org/apache/hadoop/hbase/tmpl/regionserver/BlockCacheTmpl.jamon
package org.apache.hadoop.hbase.tmpl.regionserver;
// 37, 1
import java.util.Map;
// 38, 1
import org.apache.hadoop.hbase.io.hfile.BlockCacheUtil.CachedBlocksByFile;
// 39, 1
import org.apache.hadoop.hbase.io.hfile.AgeSnapshot;
// 40, 1
import org.apache.hadoop.hbase.io.hfile.CachedBlock;
// 41, 1
import org.apache.hadoop.conf.Configuration;
// 42, 1
import org.apache.hadoop.hbase.io.hfile.CacheConfig;
// 43, 1
import org.apache.hadoop.hbase.io.hfile.BlockCache;
// 44, 1
import org.apache.hadoop.hbase.io.hfile.bucket.BucketCacheStats;
// 45, 1
import org.apache.hadoop.hbase.io.hfile.bucket.BucketCache;
// 46, 1
import org.apache.hadoop.hbase.io.hfile.bucket.BucketAllocator;
// 47, 1
import org.apache.hadoop.hbase.io.hfile.bucket.BucketAllocator.Bucket;
// 48, 1
import org.apache.hadoop.util.StringUtils.TraditionalBinaryPrefix;
@org.jamon.annotations.Template(
signature = "EE8BF9A7BD33760A0A8A22DB0A02AA1F",
requiredArguments = {
@org.jamon.annotations.Argument(name = "cacheConfig", type = "CacheConfig"),
@org.jamon.annotations.Argument(name = "config", type = "Configuration")})
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;
}
@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)
{
return new org.jamon.AbstractRenderer() {
@Override
public void renderTo(final java.io.Writer jamonWriter)
throws java.io.IOException
{
render(jamonWriter, cacheConfig, config);
}
};
}
public void render(final java.io.Writer jamonWriter, final CacheConfig cacheConfig, final Configuration config)
throws java.io.IOException
{
renderNoFlush(jamonWriter, cacheConfig, config);
jamonWriter.flush();
}
public void renderNoFlush(final java.io.Writer jamonWriter, final CacheConfig cacheConfig, final Configuration config)
throws java.io.IOException
{
ImplData implData = getImplData();
implData.setCacheConfig(cacheConfig);
implData.setConfig(config);
Intf instance = (Intf) getTemplateManager().constructImpl(this);
instance.renderNoFlush(jamonWriter);
reset();
}
}