本文整理汇总了Java中org.apache.cassandra.service.CacheService.CacheType方法的典型用法代码示例。如果您正苦于以下问题:Java CacheService.CacheType方法的具体用法?Java CacheService.CacheType怎么用?Java CacheService.CacheType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.cassandra.service.CacheService
的用法示例。
在下文中一共展示了CacheService.CacheType方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getSerializedCachePath
import org.apache.cassandra.service.CacheService; //导入方法依赖的package包/类
public static File getSerializedCachePath(String ksName, String cfName, UUID cfId, CacheService.CacheType cacheType, String version)
{
StringBuilder builder = new StringBuilder();
builder.append(ksName).append('-');
builder.append(cfName).append('-');
if (cfId != null)
builder.append(ByteBufferUtil.bytesToHex(ByteBufferUtil.bytes(cfId))).append('-');
builder.append(cacheType);
builder.append((version == null ? "" : "-" + version + ".db"));
return new File(conf.saved_caches_directory, builder.toString());
}
示例2: getSerializedCachePath
import org.apache.cassandra.service.CacheService; //导入方法依赖的package包/类
public static File getSerializedCachePath(String ksName, String cfName, UUID cfId, CacheService.CacheType cacheType, String version)
{
StringBuilder builder = new StringBuilder();
builder.append(ksName).append('-');
builder.append(cfName).append('-');
builder.append(ByteBufferUtil.bytesToHex(ByteBufferUtil.bytes(cfId))).append('-');
builder.append(cacheType);
builder.append((version == null ? "" : "-" + version + ".db"));
return new File(conf.saved_caches_directory, builder.toString());
}
示例3: AutoSavingCache
import org.apache.cassandra.service.CacheService; //导入方法依赖的package包/类
public AutoSavingCache(ICache<K, V> cache, CacheService.CacheType cacheType, CacheSerializer<K, V> cacheloader)
{
super(cacheType.toString(), cache);
this.cacheType = cacheType;
this.cacheLoader = cacheloader;
}
示例4: cacheType
import org.apache.cassandra.service.CacheService; //导入方法依赖的package包/类
public CacheService.CacheType cacheType()
{
return cacheType;
}
示例5: getSerializedCachePath
import org.apache.cassandra.service.CacheService; //导入方法依赖的package包/类
public static File getSerializedCachePath(String ksName, String cfName, CacheService.CacheType cacheType, String version)
{
return new File(conf.saved_caches_directory + File.separator + ksName + "-" + cfName + "-" + cacheType + (version == null ? "" : "-" + version + ".db"));
}
示例6: getSerializedCachePath
import org.apache.cassandra.service.CacheService; //导入方法依赖的package包/类
public static File getSerializedCachePath(CacheService.CacheType cacheType, String version, String extension)
{
String name = cacheType.toString()
+ (version == null ? "" : "-" + version + "." + extension);
return new File(conf.saved_caches_directory, name);
}