public Memory copy(long newSize) { Memory copy = Memory.allocate(newSize); copy.put(0, this, 0, Math.min(size(), newSize)); return copy; }
public Memory copy(long newSize) { Memory copy = Memory.allocate(newSize); copy.put(0, this, 0, Math.min(size(), newSize)); return copy; }
public Memory copy(long newSize) { Memory copy = Memory.allocate(newSize); copy.put(0, this, 0, Math.min(size(), newSize)); return copy; }
public Memory copy(long newSize) { Memory copy = Memory.allocate(newSize); copy.put(0, this, 0, Math.min(size(), newSize)); return copy; }
public Memory copy(long newSize) { Memory copy = Memory.allocate(newSize); copy.put(0, this, 0, Math.min(size(), newSize)); return copy; }
public OffHeapBitSet(long numBits) { // OpenBitSet.bits2words calculation is there for backward compatibility. long wordCount = OpenBitSet.bits2words(numBits); if (wordCount > Integer.MAX_VALUE) throw new UnsupportedOperationException("Bloom filter size is > 16GB, reduce the bloom_filter_fp_chance"); try { long byteCount = wordCount * 8L; bytes = Memory.allocate(byteCount); } catch (OutOfMemoryError e) { throw new RuntimeException("Out of native memory occured, You can avoid it by increasing the system ram space or by increasing bloom_filter_fp_chance."); } // flush/clear the existing memory. clear(); }
public OffHeapBitSet(long numBits) { // OpenBitSet.bits2words calculation is there for backward compatibility. long wordCount = OpenBitSet.bits2words(numBits); if (wordCount > Integer.MAX_VALUE) throw new UnsupportedOperationException("Bloom filter size is > 16GB, reduce the bloom_filter_fp_chance"); try { long byteCount = wordCount * 8L; bytes = Memory.allocate(byteCount); } catch (OutOfMemoryError e) { throw new RuntimeException("Out of native memory occured, You can avoid it by increasing the system ram space or by increasing bloom_filter_fp_chance."); } // flush/clear the existing memory. clear(); }
public OffHeapBitSet(long numBits) { // OpenBitSet.bits2words calculation is there for backward compatibility. long wordCount = OpenBitSet.bits2words(numBits); if (wordCount > Integer.MAX_VALUE) throw new UnsupportedOperationException("Bloom filter size is > 16GB, reduce the bloom_filter_fp_chance"); try { long byteCount = wordCount * 8L; bytes = Memory.allocate(byteCount); } catch (OutOfMemoryError e) { throw new RuntimeException("Out of native memory occured, You can avoid it by increasing the system ram space or by increasing bloom_filter_fp_chance."); } // flush/clear the existing memory. clear(); }
public OffHeapBitSet(long numBits) { // OpenBitSet.bits2words calculation is there for backward compatibility. long wordCount = OpenBitSet.bits2words(numBits); if (wordCount > Integer.MAX_VALUE) throw new UnsupportedOperationException("Bloom filter size is > 16GB, reduce the bloom_filter_fp_chance"); try { long byteCount = wordCount * 8L; bytes = Memory.allocate(byteCount); } catch (OutOfMemoryError e) { throw new RuntimeException("Out of native memory occured, You can avoid it by increasing the system ram space or by increasing bloom_filter_fp_chance."); } // flush/clear the existing memory. clear(); }
public OffHeapBitSet(long numBits) { // OpenBitSet.bits2words calculation is there for backward compatibility. long wordCount = OpenBitSet.bits2words(numBits); if (wordCount > Integer.MAX_VALUE) throw new UnsupportedOperationException("Bloom filter size is > 16GB, reduce the bloom_filter_fp_chance"); try { long byteCount = wordCount * 8L; bytes = Memory.allocate(byteCount); } catch (OutOfMemoryError e) { throw new RuntimeException("Out of native memory occured, You can avoid it by increasing the system ram space or by increasing bloom_filter_fp_chance."); } // flush/clear the existing memory. clear(); }
throw new IOException("Compressed file with 0 chunks encountered: " + input); Memory offsets = Memory.allocate(chunkCount * 8L);
Memory offsets = Memory.allocate(chunkCount * 8L); int i = 0; try
Memory offsets = Memory.allocate(chunkCount * 8L); int i = 0; try
Memory offsets = Memory.allocate(chunkCount * 8L); int i = 0; try
@SuppressWarnings("resource") public static OffHeapBitSet deserialize(DataInput in) throws IOException { long byteCount = in.readInt() * 8L; Memory memory = Memory.allocate(byteCount); for (long i = 0; i < byteCount;) { long v = in.readLong(); memory.setByte(i++, (byte) (v >>> 0)); memory.setByte(i++, (byte) (v >>> 8)); memory.setByte(i++, (byte) (v >>> 16)); memory.setByte(i++, (byte) (v >>> 24)); memory.setByte(i++, (byte) (v >>> 32)); memory.setByte(i++, (byte) (v >>> 40)); memory.setByte(i++, (byte) (v >>> 48)); memory.setByte(i++, (byte) (v >>> 56)); } return new OffHeapBitSet(memory); }
@SuppressWarnings("resource") public static OffHeapBitSet deserialize(DataInput in) throws IOException { long byteCount = in.readInt() * 8L; Memory memory = Memory.allocate(byteCount); for (long i = 0; i < byteCount;) { long v = in.readLong(); memory.setByte(i++, (byte) (v >>> 0)); memory.setByte(i++, (byte) (v >>> 8)); memory.setByte(i++, (byte) (v >>> 16)); memory.setByte(i++, (byte) (v >>> 24)); memory.setByte(i++, (byte) (v >>> 32)); memory.setByte(i++, (byte) (v >>> 40)); memory.setByte(i++, (byte) (v >>> 48)); memory.setByte(i++, (byte) (v >>> 56)); } return new OffHeapBitSet(memory); }
public static OffHeapBitSet deserialize(DataInput in) throws IOException { long byteCount = in.readInt() * 8L; Memory memory = Memory.allocate(byteCount); for (long i = 0; i < byteCount;) { long v = in.readLong(); memory.setByte(i++, (byte) (v >>> 0)); memory.setByte(i++, (byte) (v >>> 8)); memory.setByte(i++, (byte) (v >>> 16)); memory.setByte(i++, (byte) (v >>> 24)); memory.setByte(i++, (byte) (v >>> 32)); memory.setByte(i++, (byte) (v >>> 40)); memory.setByte(i++, (byte) (v >>> 48)); memory.setByte(i++, (byte) (v >>> 56)); } return new OffHeapBitSet(memory); }
@SuppressWarnings("resource") public static OffHeapBitSet deserialize(DataInput in) throws IOException { long byteCount = in.readInt() * 8L; Memory memory = Memory.allocate(byteCount); for (long i = 0; i < byteCount;) { long v = in.readLong(); memory.setByte(i++, (byte) (v >>> 0)); memory.setByte(i++, (byte) (v >>> 8)); memory.setByte(i++, (byte) (v >>> 16)); memory.setByte(i++, (byte) (v >>> 24)); memory.setByte(i++, (byte) (v >>> 32)); memory.setByte(i++, (byte) (v >>> 40)); memory.setByte(i++, (byte) (v >>> 48)); memory.setByte(i++, (byte) (v >>> 56)); } return new OffHeapBitSet(memory); }
@SuppressWarnings("resource") public static OffHeapBitSet deserialize(DataInput in) throws IOException { long byteCount = in.readInt() * 8L; Memory memory = Memory.allocate(byteCount); for (long i = 0; i < byteCount;) { long v = in.readLong(); memory.setByte(i++, (byte) (v >>> 0)); memory.setByte(i++, (byte) (v >>> 8)); memory.setByte(i++, (byte) (v >>> 16)); memory.setByte(i++, (byte) (v >>> 24)); memory.setByte(i++, (byte) (v >>> 32)); memory.setByte(i++, (byte) (v >>> 40)); memory.setByte(i++, (byte) (v >>> 48)); memory.setByte(i++, (byte) (v >>> 56)); } return new OffHeapBitSet(memory); }