Package com.mobixess.jodb.core.io

Examples of com.mobixess.jodb.core.io.IRandomAccessDataBuffer.seek()


        long objectsWithRelativeAddrStartOffsetShift = -1;
        if(fieldsWithRelativeAddr.size()>0){//with relative offsets
            transactionFile.writeShort(fieldsWithRelativeAddr.size());
            objectsWithRelativeAddrStartOffsetShift = transactionFile.getCursorOffset() - objectIDOffset;
            transactionFile.setLength(transactionFile.length()+ fieldsWithRelativeAddr.size()*(2+4));
            transactionFile.seek(transactionFile.length());
        }
       
        if(primitiveFields.size()>0){
            transactionFile.writeShort(primitiveFields.size());
        }
View Full Code Here


                replacementsFile.writeShort(objIdWithRedirectionBit);//write new ID to replacements file
                writeEntryLenForID(objId,objectBodyLength,replacementsFile);//write length of replacements file, could be bigger than actual object's data occupies
               
                long newObjectBodyOffset = replacementsFile.getCursorOffset();
                //return to write actual length of replacement entry
                replacementsFile.seek(replacementLengthEntryOffset);
                replacementsFile.writeLong(newObjectBodyOffset-newObjectIDOffset+objectBodyLength);
                replacementsFile.seek(newObjectBodyOffset);//back to the header end
               
                transactionFile.transferTo(objectBodyOffset, objectBodyLength, replacementsFile.getChannel());
                transactionFile.seek(objectIDOffset);//return position in transaction file to the start of object(like it wasn't here)
View Full Code Here

               
                long newObjectBodyOffset = replacementsFile.getCursorOffset();
                //return to write actual length of replacement entry
                replacementsFile.seek(replacementLengthEntryOffset);
                replacementsFile.writeLong(newObjectBodyOffset-newObjectIDOffset+objectBodyLength);
                replacementsFile.seek(newObjectBodyOffset);//back to the header end
               
                transactionFile.transferTo(objectBodyOffset, objectBodyLength, replacementsFile.getChannel());
                transactionFile.seek(objectIDOffset);//return position in transaction file to the start of object(like it wasn't here)
                transactionFile.setLength(objectIDOffset);//truncate "new data" file
                objectIDOffset = newObjectIDOffset;//this now offset in replacements file
View Full Code Here

        replacementsFile.writeLong(0);//reserving space for entry's length
        long entryOffsetStart = replacementsFile.getCursorOffset();
        TransactionUtils.writeEmptyObjectEntry(replacementsFile , container.getBodyLength());
        long entryEnd = replacementsFile.getCursorOffset();
        long entryLength = entryEnd - entryOffsetStart;
        replacementsFile.seek(entryOffsetStart-8);//go back to entry's length
        replacementsFile.writeLong(entryLength);
        if(container.isRedirection()){
            persistentObjectOffset = container.getOffset();
            deleteObject(ioTicket, session, persistentObjectOffset, tContainer);
        }
View Full Code Here

        if(container.isRedirection()){
            persistentObjectOffset = container.getOffset();
            deleteObject(ioTicket, session, persistentObjectOffset, tContainer);
        }
        dataContainersCache.pushObjectDataContainer(container);
        replacementsFile.seek(entryEnd);
    }

   
    private static boolean checkActiveObjectUnchanged(IClassProcessor processor, JODBOperationContext context, Object obj, TransactionHandle tHandle, ObjectDataContainer persistentCopyObjectDataContainer, Vector<IndexingRecord> indexes) throws IOException, IllegalClassTypeException{
        //TODO add mask verification
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.