@Override public synchronized int getEstimatedFootprintInBytes() { return super.getEstimatedFootprintInBytes(); }
public long getEstimatedMemoryFootprint() { return state.getEstimatedFootprintInBytes(); }
@Override public synchronized int getEstimatedFootprintInBytes() { return super.getEstimatedFootprintInBytes(); }
public long getEstimatedMemoryFootprint() { return state.getEstimatedFootprintInBytes(); }
public long getEstimatedMemoryFootprint() { return state.getEstimatedFootprintInBytes(); }
public long getEstimatedMemoryFootprint() { return state.getEstimatedFootprintInBytes(); }
public long getEstimatedMemoryFootprint() { return state.getEstimatedFootprintInBytes(); }
@Override public byte[] toBinary() { final int positiveBytes = positiveHistogram.getEstimatedFootprintInBytes(); final int bytesNeeded = positiveBytes + (negativeHistogram == null ? 0 : negativeHistogram.getEstimatedFootprintInBytes()); final ByteBuffer buffer = super.binaryBuffer(bytesNeeded + 5); final int startPosition = buffer.position(); buffer.putInt(startPosition); // buffer out an int positiveHistogram.encodeIntoCompressedByteBuffer(buffer); final int endPosition = buffer.position(); buffer.position(startPosition); buffer.putInt(endPosition); buffer.position(endPosition); if (negativeHistogram != null) { buffer.put((byte) 0x01); negativeHistogram.encodeIntoCompressedByteBuffer(buffer); } else { buffer.put((byte) 0x00); } final byte result[] = new byte[buffer.position() + 1]; buffer.rewind(); buffer.get(result); return result; }