本文整理汇总了Java中com.netflix.astyanax.serializers.LongSerializer.get方法的典型用法代码示例。如果您正苦于以下问题:Java LongSerializer.get方法的具体用法?Java LongSerializer.get怎么用?Java LongSerializer.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.netflix.astyanax.serializers.LongSerializer
的用法示例。
在下文中一共展示了LongSerializer.get方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getColumnFamilyViaColumnName
import com.netflix.astyanax.serializers.LongSerializer; //导入方法依赖的package包/类
/**
* returns a ColumnFamily given a columnFamilyName
* @param columnFamilyName
* @param rowKeyClass
* @return a constructed ColumnFamily
*/
@SuppressWarnings({"unchecked", "rawtypes"})
protected ColumnFamily getColumnFamilyViaColumnName(String columnFamilyName, Class rowKeyClass) {
if (rowKeyClass == String.class) {
return new ColumnFamily(columnFamilyName, StringSerializer.get(), StringSerializer.get());
} else if (rowKeyClass == Integer.class) {
return new ColumnFamily(columnFamilyName, IntegerSerializer.get(), StringSerializer.get());
} else if (rowKeyClass == Long.class) {
return new ColumnFamily(columnFamilyName, LongSerializer.get(), StringSerializer.get());
} else {
throw new IllegalArgumentException("RowKeyType is not supported: " + rowKeyClass.getSimpleName() + ". String/Integer/Long are supported, or you can define the ColumnFamily yourself and use the other constructor.");
}
}
示例2: getHecubaClientManager
import com.netflix.astyanax.serializers.LongSerializer; //导入方法依赖的package包/类
public HecubaClientManager<Long> getHecubaClientManager(CassandraParamsBean paramsBean) {
return new AstyanaxBasedHecubaClientManager<Long>(paramsBean, LongSerializer.get());
}
示例3: MetricColumnFamily
import com.netflix.astyanax.serializers.LongSerializer; //导入方法依赖的package包/类
public MetricColumnFamily(String name, TimeValue ttl) {
super(name, LocatorSerializer.get(), LongSerializer.get());
this.ttl = ttl;
}