Examples of MemorySegment


Examples of org.apache.flink.core.memory.MemorySegment

    } else {
      this.numSegments = memory.size();
      // load the segments into the queue
      final LinkedBlockingQueue<MemorySegment> queue = writer.getReturnQueue();
      for (int i = memory.size() - 1; i >= 0; --i) {
        final MemorySegment seg = memory.get(i);
        if (seg.size() != segmentSize) {
          throw new IllegalArgumentException("The supplied memory segments are not of the specified size.");
        }
        queue.add(seg);
      }
    }
View Full Code Here

Examples of org.apache.flink.core.memory.MemorySegment

    @Override
    protected MemorySegment nextSegment(MemorySegment current, int bytesUsed) throws IOException
    {
      finalizeSegment(current, bytesUsed);
     
      final MemorySegment next;
      if (this.writer == null) {
        this.targetList.add(current);
        next = this.memSource.nextSegment();
      } else {
        this.writer.writeBlock(current);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.