本文整理汇总了Java中org.apache.cassandra.utils.obs.OpenBitSet.deserialize方法的典型用法代码示例。如果您正苦于以下问题:Java OpenBitSet.deserialize方法的具体用法?Java OpenBitSet.deserialize怎么用?Java OpenBitSet.deserialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.cassandra.utils.obs.OpenBitSet
的用法示例。
在下文中一共展示了OpenBitSet.deserialize方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: deserialize
import org.apache.cassandra.utils.obs.OpenBitSet; //导入方法依赖的package包/类
@SuppressWarnings("resource")
public static BloomFilter deserialize(DataInput in, boolean offheap, boolean oldBfHashOrder) throws IOException
{
int hashes = in.readInt();
IBitSet bs = offheap ? OffHeapBitSet.deserialize(in) : OpenBitSet.deserialize(in);
return new BloomFilter(hashes, bs, oldBfHashOrder);
}
示例2: testExpectedCompatablity
import org.apache.cassandra.utils.obs.OpenBitSet; //导入方法依赖的package包/类
/**
* Test compatibility with a 1.1-version data file
*/
@Test
public void testExpectedCompatablity() throws IOException
{
DataInputStream dis = new DataInputStream(new FileInputStream(new File(LEGACY_SST_FILE)));
dis.readInt(); // bloom filter hash count
OpenBitSet bs = OpenBitSet.deserialize(dis);
dis = new DataInputStream(new FileInputStream(new File(LEGACY_SST_FILE)));
dis.readInt(); // bloom filter hash count
OffHeapBitSet obs = OffHeapBitSet.deserialize(dis);
compare(obs, bs);
}
示例3: deserialize
import org.apache.cassandra.utils.obs.OpenBitSet; //导入方法依赖的package包/类
public BloomFilter deserialize(DataInput in, boolean offheap) throws IOException
{
int hashes = in.readInt();
IBitSet bs = offheap ? OffHeapBitSet.deserialize(in) : OpenBitSet.deserialize(in);
return createFilter(hashes, bs);
}
示例4: deserialize
import org.apache.cassandra.utils.obs.OpenBitSet; //导入方法依赖的package包/类
public BloomFilter deserialize(DataInput dis, boolean offheap) throws IOException
{
int hashes = dis.readInt();
IBitSet bs = offheap ? OffHeapBitSet.deserialize(dis) : OpenBitSet.deserialize(dis);
return createFilter(hashes, bs);
}