Package org.xtreemfs.foundation.buffer

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


        if (data != null) {
            f = data.createViewBuffer();
            f.limit(limit);
            from = f.getData();
            t = data.createViewBuffer();
            t.position(limit);
            to = t.getData();
        }
       
        Logging.logMessage(Logging.LEVEL_DEBUG, this, "RangeLookupOperation:" +
                "db %s, index %d, from %s, to %s.", req.getDatabaseName(), req.getIndexId(),
View Full Code Here


        if (data != null) {
            f = data.createViewBuffer();
            f.limit(limit);
            from = f.getData();
            t = data.createViewBuffer();
            t.position(limit);
            to = t.getData();
        }
      
        Logging.logMessage(Logging.LEVEL_DEBUG, this, "RangeLookupReverseOperation:" +
                "db %s, index %d, from %s, to %s.", req.getDatabaseName(), req.getIndexId(),
View Full Code Here

        buf.putInt(bufSize);
        buf.flip();
       
        if (USE_CHECKSUMS) {
            // reset the old checksum to 0, before calculating a new one
            buf.position(Integer.SIZE / 8);
            buf.putInt(0);
            buf.position(0);
           
            csumAlgo.update(buf.array(), 0, buf.limit());
            int cPos = buf.position();
View Full Code Here

       
        if (USE_CHECKSUMS) {
            // reset the old checksum to 0, before calculating a new one
            buf.position(Integer.SIZE / 8);
            buf.putInt(0);
            buf.position(0);
           
            csumAlgo.update(buf.array(), 0, buf.limit());
            int cPos = buf.position();
           
            // write the checksum to the buffer
View Full Code Here

            buf.position(Integer.SIZE / 8);
            buf.putInt(0);
            buf.position(0);
           
            csumAlgo.update(buf.array(), 0, buf.limit());
            int cPos = buf.position();
           
            // write the checksum to the buffer
            buf.position(Integer.SIZE / 8);
            buf.putInt((int) csumAlgo.getValue());
            buf.position(cPos);
View Full Code Here

           
            csumAlgo.update(buf.array(), 0, buf.limit());
            int cPos = buf.position();
           
            // write the checksum to the buffer
            buf.position(Integer.SIZE / 8);
            buf.putInt((int) csumAlgo.getValue());
            buf.position(cPos);
        }
       
        return buf;
View Full Code Here

            int cPos = buf.position();
           
            // write the checksum to the buffer
            buf.position(Integer.SIZE / 8);
            buf.putInt((int) csumAlgo.getValue());
            buf.position(cPos);
        }
       
        return buf;
    }
   
View Full Code Here

            newBuf.put(buf);
       
        for (int offs : offsets)
            newBuf.putInt(offs);
       
        newBuf.position(0);
       
        return newBuf;
    }
   
    private static ReusableBuffer serializeVarLenPage(List<Object> list) {
View Full Code Here

            newBuf.put(InternalBufferUtil.toBuffer(buf));
       
        for (int offs : offsets)
            newBuf.putInt(offs);
       
        newBuf.position(0);
       
        return newBuf;
    }
   
    private static ReusableBuffer serializeFixedLenPage(List<Object> list) {
View Full Code Here

       
        ReusableBuffer newBuf = BufferPool.allocate(size);
        for (Object buf : list)
            newBuf.put(InternalBufferUtil.toBuffer(buf));
       
        newBuf.position(0);
       
        return newBuf;
    }
   
    // private static SerializedPage serializeVarLenPage(List<Object> list) {
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.