@Override public ByteBuffer read(long id) { if ( passthrough ) { return base.read(id) ; } if ( id < otherAllocOffset ) return base.read(id) ; long x = mapToOther(id) ; return transObjects.read(id-otherAllocOffset) ; }
@Override public void truncate(long id) { if ( passthrough ) { base.truncate(id) ; return ; } if ( id > otherAllocOffset ) { transObjects.truncate(mapToOther(id)) ; return ; } base.truncate(id) ; transObjects.truncate(0) ; otherAllocOffset = base.length() ; }
@Override public void reposition(long id) { if ( passthrough ) { base.reposition(id) ; return ; } if ( id > otherAllocOffset ) { transObjects.reposition(mapToOther(id)) ; return ; } Log.warn(this, "Unexpected: Attempt to reposition over base file") ; base.reposition(id) ; transObjects.reposition(0) ; otherAllocOffset = base.length() ; }