private void initialiseLastPageId( long lastPageIdFromFile ) { if ( lastPageIdFromFile < 0 ) { // MIN_VALUE only has the sign bit raised, and the rest of the bits are zeros. UnsafeUtil.putLongVolatile( this, headerStateOffset, Long.MIN_VALUE ); } else { UnsafeUtil.putLongVolatile( this, headerStateOffset, lastPageIdFromFile ); } }
private static void unconditionallySetState( long address, long update ) { UnsafeUtil.putLongVolatile( address, update ); }
private void setCurrentFileSize( long size ) { UnsafeUtil.putLongVolatile( this, fileSizeOffset, size ); }
obj.aLong = 0; assertThat( obj, is( new Obj() ) ); putLongVolatile( obj, aLongOffset, 2 ); assertThat( obj.aLong, is( 2L ) ); assertThat( getLongVolatile( obj, aLongOffset ), is( 2L ) );
assertThat( getLong( address ), is( 0L ) ); putLongVolatile( address, 1 ); assertThat( getLongVolatile( address ), is( 1L ) ); setMemory( address, sizeInBytes, (byte) 0 );
private void initialiseLastPageId( long lastPageIdFromFile ) { if ( lastPageIdFromFile < 0 ) { // MIN_VALUE only has the sign bit raised, and the rest of the bits are zeros. UnsafeUtil.putLongVolatile( this, headerStateOffset, Long.MIN_VALUE ); } else { UnsafeUtil.putLongVolatile( this, headerStateOffset, lastPageIdFromFile ); } }
private void setCurrentFileSize( long size ) { UnsafeUtil.putLongVolatile( this, fileSizeOffset, size ); }
private static void unconditionallySetState( long address, long update ) { UnsafeUtil.putLongVolatile( address, update ); }