/** * Stores the stream to its chunk using the atomic union. After the data from the stream is * stored, its memory is freed up. */ public void store() { assert _ab.eof(); Key k = ValueArray.getChunkKey(_chunkIndex, _resultKey); AtomicUnion u = new AtomicUnion(_ab.bufClose(), _chunkOffset); alsoBlockFor(u.fork(k)); _ab = null; // free mem }
@Override public C2SChunk read(AutoBuffer bb) { _mem = bb.bufClose(); _start = -1; _len = (_mem.length - OFF) >> 1; _scale = UDP.get8d(_mem, 0); _bias = UDP.get4(_mem, 8); return this; }