Examples of bufferAvailable()


Examples of org.apache.flink.runtime.io.network.netty.InboundEnvelopeDecoder.bufferAvailable()

    Assert.assertFalse(ch.config().isAutoRead());

    // notify of available buffer (=> bufferAvailable() callback does return a buffer
    // of the current network buffer size; the decoder needs to adjust its size to the
    // requested size
    decoder.bufferAvailable(allocBuffer(envelopes[0].getBuffer().size() * 2));
    ch.runPendingTasks();

    Assert.assertEquals(refCount - 1, slices[0].refCnt());
    Assert.assertTrue(ch.config().isAutoRead());

View Full Code Here

Examples of org.apache.flink.runtime.io.network.netty.InboundEnvelopeDecoder.bufferAvailable()

    decodeAndVerify(ch, slices[1]);

    Assert.assertEquals(refCount + 1, slices[1].refCnt());
    Assert.assertFalse(ch.config().isAutoRead());

    decoder.bufferAvailable(allocBuffer());
    ch.runPendingTasks();

    Assert.assertEquals(refCount - 1, slices[1].refCnt());
    Assert.assertTrue(ch.config().isAutoRead());
View Full Code Here

Examples of org.apache.flink.runtime.io.network.netty.InboundEnvelopeDecoder.bufferAvailable()

        Assert.assertFalse(ch.config().isAutoRead());
        Assert.assertEquals(refCount + 1, slice.refCnt());

        // return a buffer of max size => decoder needs to limit buffer size
        decoder.bufferAvailable(allocBuffer(MAX_BUFFER_SIZE));
        ch.runPendingTasks();
      }

      Assert.assertEquals(refCount - 1, slice.refCnt());
      Assert.assertTrue(ch.config().isAutoRead());
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.