@Override public final void prepare( RECORD record, int recordSize, IdSequence idSequence ) { if ( record.inUse() ) { int requiredLength = HEADER_BYTE + requiredDataLength( record ); boolean requiresSecondaryUnit = requiredLength > recordSize; record.setRequiresSecondaryUnit( requiresSecondaryUnit ); if ( record.requiresSecondaryUnit() && !record.hasSecondaryUnitId() ) { // Allocate a new id at this point, but this is not the time to free this ID the the case where // this record doesn't need this secondary unit anymore... that needs to be done when applying to store. record.setSecondaryUnitId( idSequence.nextId() ); } } }
@Override public final void prepare( RECORD record, int recordSize, IdSequence idSequence ) { if ( record.inUse() ) { record.setUseFixedReferences( canUseFixedReferences( record, recordSize )); if ( !record.isUseFixedReferences() ) { int requiredLength = HEADER_BYTE + requiredDataLength( record ); boolean requiresSecondaryUnit = requiredLength > recordSize; record.setRequiresSecondaryUnit( requiresSecondaryUnit ); if ( record.requiresSecondaryUnit() && !record.hasSecondaryUnitId() ) { // Allocate a new id at this point, but this is not the time to free this ID the the case where // this record doesn't need this secondary unit anymore... that needs to be done when applying to store. record.setSecondaryUnitId( idSequence.nextId() ); } } } }
@Override public final void prepare( RECORD record, int recordSize, IdSequence idSequence ) { if ( record.inUse() ) { record.setUseFixedReferences( canUseFixedReferences( record, recordSize )); if ( !record.isUseFixedReferences() ) { int requiredLength = HEADER_BYTE + requiredDataLength( record ); boolean requiresSecondaryUnit = requiredLength > recordSize; record.setRequiresSecondaryUnit( requiresSecondaryUnit ); if ( record.requiresSecondaryUnit() && !record.hasSecondaryUnitId() ) { // Allocate a new id at this point, but this is not the time to free this ID the the case where // this record doesn't need this secondary unit anymore... that needs to be done when applying to store. record.setSecondaryUnitId( idSequence.nextId() ); } } } }
@Override public final void prepare( RECORD record, int recordSize, IdSequence idSequence ) { if ( record.inUse() ) { record.setUseFixedReferences( canUseFixedReferences( record, recordSize )); if ( !record.isUseFixedReferences() ) { int requiredLength = HEADER_BYTE + requiredDataLength( record ); boolean requiresSecondaryUnit = requiredLength > recordSize; record.setRequiresSecondaryUnit( requiresSecondaryUnit ); if ( record.requiresSecondaryUnit() && !record.hasSecondaryUnitId() ) { // Allocate a new id at this point, but this is not the time to free this ID the the case where // this record doesn't need this secondary unit anymore... that needs to be done when applying to store. record.setSecondaryUnitId( idSequence.nextId() ); } } } }
@Override public final void prepare( RECORD record, int recordSize, IdSequence idSequence ) { if ( record.inUse() ) { record.setUseFixedReferences( canUseFixedReferences( record, recordSize )); if ( !record.isUseFixedReferences() ) { int requiredLength = HEADER_BYTE + requiredDataLength( record ); boolean requiresSecondaryUnit = requiredLength > recordSize; record.setRequiresSecondaryUnit( requiresSecondaryUnit ); if ( record.requiresSecondaryUnit() && !record.hasSecondaryUnitId() ) { // Allocate a new id at this point, but this is not the time to free this ID the the case where // this record doesn't need this secondary unit anymore... that needs to be done when applying to store. record.setSecondaryUnitId( idSequence.nextId() ); } } } }