Package org.zper.base.ZLog

Examples of org.zper.base.ZLog.SegmentInfo.start()


        sock.connect("tcp://127.0.0.1:6556");

        //  Latest offset
        sock.sendMore("FETCH");
        sock.sendMore(ByteBuffer.allocate(8).putLong(last.start()).array());
        sock.send(ByteBuffer.allocate(8).putLong(Integer.MAX_VALUE).array());

        Msg status = sock.base().recv(0);
        assertEquals(100, status.data()[0]);
View Full Code Here


                    offset, info == null ? -1 : info.flushedOffset());
            code(ZPConstants.TYPE_RESPONSE, ZPConstants.STATUS_INVALID_OFFSET);
            return;
        }

        assert (info.start() <= offset);

        code(ZPConstants.TYPE_FILE, ZPConstants.STATUS_OK);
        worker.sendMore(info.path());
        sendLong(offset - info.start(), true);
        if (info.flushedOffset() - offset < size)
View Full Code Here

        assert (info.start() <= offset);

        code(ZPConstants.TYPE_FILE, ZPConstants.STATUS_OK);
        worker.sendMore(info.path());
        sendLong(offset - info.start(), true);
        if (info.flushedOffset() - offset < size)
            size = info.flushedOffset() - offset;
        sendLong(size, false);

        if (LOG.isDebugEnabled())
View Full Code Here

        Msg status = sock.base().recv(0);
        assertEquals(100, status.data()[0]);

        Msg result = sock.base().recv(0);
        assertEquals((int) (last.offset() - last.start()), result.size());

        Iterator<Msg> it = new MsgIterator(result.buf(), false);
        while (it.hasNext()) {
            it.next();
        }
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.