Package org.xtreemfs.foundation.buffer

Examples of org.xtreemfs.foundation.buffer.ReusableBuffer.position()


                    int bufferPos = buffer.position();
                    int pos = bufferPos + length;
                   
                    // prepare view buffer
                    view = buffer.createViewBuffer();
                    view.position(bufferPos);
                    view.limit(pos);
                   
                    // reset buffer position
                    buffer.position(pos);
                   
View Full Code Here


       
        // serialize transaction to buffer
        int size = txn.getSize();
        ReusableBuffer buf = BufferPool.allocate(size);
        txn.serialize(buf);
        assertEquals(buf.position(), size);
       
        // deserialize transaction from buffer
        buf.position(0);
        TransactionInternal txn2 = TransactionInternal.deserialize(buf);
        assertEquals(buf.position(), size);
View Full Code Here

        ReusableBuffer buf = BufferPool.allocate(size);
        txn.serialize(buf);
        assertEquals(buf.position(), size);
       
        // deserialize transaction from buffer
        buf.position(0);
        TransactionInternal txn2 = TransactionInternal.deserialize(buf);
        assertEquals(buf.position(), size);
       
        // compare original transaction with deserialized transaction
        assertEquals(txn.getSize(), txn2.getSize());
View Full Code Here

        assertEquals(buf.position(), size);
       
        // deserialize transaction from buffer
        buf.position(0);
        TransactionInternal txn2 = TransactionInternal.deserialize(buf);
        assertEquals(buf.position(), size);
       
        // compare original transaction with deserialized transaction
        assertEquals(txn.getSize(), txn2.getSize());
        assertEquals(txn.getOperations().size(), txn2.getOperations().size());
        for (int i = 0; i < txn.getOperations().size(); i++) {
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.