test_class.declarator: engine = (StorageDirect) super.engine
test_class.original_string: StorageDirect engine = (StorageDirect) super.engine;
test_class.type: StorageDirect
test_class.var_name: engine
test_class.declarator: TEST_LS_RECID = StorageDirect.RECID_FREE_PHYS_RECORDS_START+1
test_class.modifier: static final
test_class.original_string: static final long TEST_LS_RECID = StorageDirect.RECID_FREE_PHYS_RECORDS_START+1 ;
test_class.type: long
test_class.var_name: TEST_LS_RECID
test_class.file: migration/third-party/org.mapdb/src/test/java/org/mapdb/StorageDirectTest.java
test_class.identifier: StorageDirectTest
test_class.superclass: extends StorageTestCase
test_case.body: @Test public void test_freePhysRecSize2FreeSlot_incremental(){
          int oldSlot = -1;
          for(int size = 1;size<= StorageDirect.MAX_RECORD_SIZE;size++){
              int slot = engine.freePhysRecSize2FreeSlot(size);
              assertTrue(slot >= 0);
              assertTrue(oldSlot <= slot);
              assertTrue(slot - oldSlot <= 1);
              oldSlot= slot;
          }
          assertEquals(StorageDirect.NUMBER_OF_PHYS_FREE_SLOT - 1, oldSlot);
      }
test_case.class_method_signature: StorageDirectTest.test_freePhysRecSize2FreeSlot_incremental()
test_case.full_signature: @Test public void test_freePhysRecSize2FreeSlot_incremental()
test_case.identifier: test_freePhysRecSize2FreeSlot_incremental
test_case.invocations: freePhysRecSize2FreeSlot assertTrue assertTrue assertTrue assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void test_freePhysRecSize2FreeSlot_incremental()
focal_class.declarator: PHYS_OFFSET_MASK = 0x0000FFFFFFFFFFFFL
focal_class.modifier: static final
focal_class.original_string: static final long PHYS_OFFSET_MASK = 0x0000FFFFFFFFFFFFL;
focal_class.type: long
focal_class.var_name: PHYS_OFFSET_MASK
focal_class.declarator: HEADER = 5646556656456456L
focal_class.modifier: static final
focal_class.original_string: static final long HEADER = 5646556656456456L;
focal_class.type: long
focal_class.var_name: HEADER
focal_class.declarator: RECID_CURRENT_PHYS_FILE_SIZE = 1
focal_class.modifier: static final
focal_class.original_string: static final int RECID_CURRENT_PHYS_FILE_SIZE = 1;
focal_class.type: int
focal_class.var_name: RECID_CURRENT_PHYS_FILE_SIZE
focal_class.declarator: RECID_CURRENT_INDEX_FILE_SIZE = 2
focal_class.modifier: static final
focal_class.original_string: static final int RECID_CURRENT_INDEX_FILE_SIZE = 2;
focal_class.type: int
focal_class.var_name: RECID_CURRENT_INDEX_FILE_SIZE
focal_class.declarator: RECID_FREE_INDEX_SLOTS = 3
focal_class.modifier: static final
focal_class.original_string: static final int RECID_FREE_INDEX_SLOTS = 3;
focal_class.type: int
focal_class.var_name: RECID_FREE_INDEX_SLOTS
focal_class.declarator: RECID_FREE_PHYS_RECORDS_START = 20
focal_class.modifier: static final
focal_class.original_string: static final int RECID_FREE_PHYS_RECORDS_START = 20;
focal_class.type: int
focal_class.var_name: RECID_FREE_PHYS_RECORDS_START
focal_class.declarator: NUMBER_OF_PHYS_FREE_SLOT =1000 + 1535
focal_class.modifier: static final
focal_class.original_string: static final int NUMBER_OF_PHYS_FREE_SLOT =1000 + 1535;
focal_class.type: int
focal_class.var_name: NUMBER_OF_PHYS_FREE_SLOT
focal_class.declarator: MAX_RECORD_SIZE = 65535
focal_class.modifier: static final
focal_class.original_string: static final int MAX_RECORD_SIZE = 65535;
focal_class.type: int
focal_class.var_name: MAX_RECORD_SIZE
focal_class.declarator: LONG_STACK_NUM_OF_RECORDS_PER_PAGE = 100
focal_class.modifier: static final
focal_class.original_string: static final byte LONG_STACK_NUM_OF_RECORDS_PER_PAGE = 100;
focal_class.type: byte
focal_class.var_name: LONG_STACK_NUM_OF_RECORDS_PER_PAGE
focal_class.declarator: LONG_STACK_PAGE_SIZE =   8 + LONG_STACK_NUM_OF_RECORDS_PER_PAGE * 8
focal_class.modifier: static final
focal_class.original_string: static final int LONG_STACK_PAGE_SIZE =   8 + LONG_STACK_NUM_OF_RECORDS_PER_PAGE * 8;
focal_class.type: int
focal_class.var_name: LONG_STACK_PAGE_SIZE
focal_class.declarator: INDEX_OFFSET_START = RECID_FREE_PHYS_RECORDS_START +NUMBER_OF_PHYS_FREE_SLOT
focal_class.modifier: static final
focal_class.original_string: static final int INDEX_OFFSET_START = RECID_FREE_PHYS_RECORDS_START +NUMBER_OF_PHYS_FREE_SLOT;
focal_class.type: int
focal_class.var_name: INDEX_OFFSET_START
focal_class.declarator: DATA_FILE_EXT = ".p"
focal_class.modifier: public static final
focal_class.original_string: public static final String DATA_FILE_EXT = ".p";
focal_class.type: String
focal_class.var_name: DATA_FILE_EXT
focal_class.declarator: lock = new ReentrantReadWriteLock()
focal_class.modifier: protected final
focal_class.original_string: protected final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
focal_class.type: ReentrantReadWriteLock
focal_class.var_name: lock
focal_class.declarator: appendOnly
focal_class.modifier: protected final
focal_class.original_string: protected final boolean appendOnly;
focal_class.type: boolean
focal_class.var_name: appendOnly
focal_class.declarator: deleteFilesOnExit
focal_class.modifier: protected final
focal_class.original_string: protected final boolean deleteFilesOnExit;
focal_class.type: boolean
focal_class.var_name: deleteFilesOnExit
focal_class.declarator: failOnWrongHeader
focal_class.modifier: protected final
focal_class.original_string: protected final boolean failOnWrongHeader;
focal_class.type: boolean
focal_class.var_name: failOnWrongHeader
focal_class.declarator: readOnly
focal_class.modifier: protected final
focal_class.original_string: protected final boolean readOnly;
focal_class.type: boolean
focal_class.var_name: readOnly
focal_class.declarator: phys
focal_class.modifier: volatile protected
focal_class.original_string: volatile protected Volume phys;
focal_class.type: Volume
focal_class.var_name: phys
focal_class.declarator: index
focal_class.modifier: volatile protected
focal_class.original_string: volatile protected Volume index;
focal_class.type: Volume
focal_class.var_name: index
focal_class.file: migration/third-party/org.mapdb/src/main/java/org/mapdb/StorageDirect.java
focal_class.identifier: StorageDirect
focal_class.interfaces: implements Engine
focal_class.class_method_signature: StorageDirect.StorageDirect(Volume.Factory volFac, boolean appendOnly,
                     boolean deleteFilesOnExit, boolean failOnWrongHeader, boolean readOnly)
focal_class.full_signature: public  StorageDirect(Volume.Factory volFac, boolean appendOnly,
                     boolean deleteFilesOnExit, boolean failOnWrongHeader, boolean readOnly)
focal_class.identifier: StorageDirect
focal_class.modifiers: public
focal_class.parameters: (Volume.Factory volFac, boolean appendOnly,
                     boolean deleteFilesOnExit, boolean failOnWrongHeader, boolean readOnly)
focal_class.signature:  StorageDirect(Volume.Factory volFac, boolean appendOnly,
                     boolean deleteFilesOnExit, boolean failOnWrongHeader, boolean readOnly)
focal_class.class_method_signature: StorageDirect.StorageDirect(Volume.Factory volFac)
focal_class.full_signature: public  StorageDirect(Volume.Factory volFac)
focal_class.identifier: StorageDirect
focal_class.modifiers: public
focal_class.parameters: (Volume.Factory volFac)
focal_class.signature:  StorageDirect(Volume.Factory volFac)
focal_class.class_method_signature: StorageDirect.put(A value, Serializer<A> serializer)
focal_class.full_signature: @Override public long put(A value, Serializer<A> serializer)
focal_class.identifier: put
focal_class.modifiers: @Override public
focal_class.parameters: (A value, Serializer<A> serializer)
focal_class.return: long
focal_class.signature: long put(A value, Serializer<A> serializer)
focal_class.class_method_signature: StorageDirect.putLargeLinkedRecord(DataOutput2 out, long recid)
focal_class.full_signature: private void putLargeLinkedRecord(DataOutput2 out, long recid)
focal_class.identifier: putLargeLinkedRecord
focal_class.modifiers: private
focal_class.parameters: (DataOutput2 out, long recid)
focal_class.return: void
focal_class.signature: void putLargeLinkedRecord(DataOutput2 out, long recid)
focal_class.class_method_signature: StorageDirect.get(long recid, Serializer<A> serializer)
focal_class.full_signature: @Override public A get(long recid, Serializer<A> serializer)
focal_class.identifier: get
focal_class.modifiers: @Override public
focal_class.parameters: (long recid, Serializer<A> serializer)
focal_class.return: A
focal_class.signature: A get(long recid, Serializer<A> serializer)
focal_class.class_method_signature: StorageDirect.update(long recid, A value, Serializer<A> serializer)
focal_class.full_signature: @Override public void update(long recid, A value, Serializer<A> serializer)
focal_class.identifier: update
focal_class.modifiers: @Override public
focal_class.parameters: (long recid, A value, Serializer<A> serializer)
focal_class.return: void
focal_class.signature: void update(long recid, A value, Serializer<A> serializer)
focal_class.class_method_signature: StorageDirect.delete(long recid, Serializer<A> serializer)
focal_class.full_signature: @Override public void delete(long recid, Serializer<A> serializer)
focal_class.identifier: delete
focal_class.modifiers: @Override public
focal_class.parameters: (long recid, Serializer<A> serializer)
focal_class.return: void
focal_class.signature: void delete(long recid, Serializer<A> serializer)
focal_class.class_method_signature: StorageDirect.commit()
focal_class.full_signature: @Override public void commit()
focal_class.identifier: commit
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void commit()
focal_class.class_method_signature: StorageDirect.rollback()
focal_class.full_signature: @Override public void rollback()
focal_class.identifier: rollback
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void rollback()
focal_class.class_method_signature: StorageDirect.longStackTake(final long listRecid)
focal_class.full_signature: protected long longStackTake(final long listRecid)
focal_class.identifier: longStackTake
focal_class.modifiers: protected
focal_class.parameters: (final long listRecid)
focal_class.return: long
focal_class.signature: long longStackTake(final long listRecid)
focal_class.class_method_signature: StorageDirect.longStackPut(final long listRecid, final long offset)
focal_class.full_signature: protected void longStackPut(final long listRecid, final long offset)
focal_class.identifier: longStackPut
focal_class.modifiers: protected
focal_class.parameters: (final long listRecid, final long offset)
focal_class.return: void
focal_class.signature: void longStackPut(final long listRecid, final long offset)
focal_class.class_method_signature: StorageDirect.freePhysRecTake(final int requiredSize)
focal_class.full_signature: protected long freePhysRecTake(final int requiredSize)
focal_class.identifier: freePhysRecTake
focal_class.modifiers: protected
focal_class.parameters: (final int requiredSize)
focal_class.return: long
focal_class.signature: long freePhysRecTake(final int requiredSize)
focal_class.class_method_signature: StorageDirect.writeInitValues()
focal_class.full_signature: private void writeInitValues()
focal_class.identifier: writeInitValues
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void writeInitValues()
focal_class.class_method_signature: StorageDirect.writeLock_checkLocked()
focal_class.full_signature: protected void writeLock_checkLocked()
focal_class.identifier: writeLock_checkLocked
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void writeLock_checkLocked()
focal_class.class_method_signature: StorageDirect.freePhysRecSize2FreeSlot(final int size)
focal_class.full_signature: final int freePhysRecSize2FreeSlot(final int size)
focal_class.identifier: freePhysRecSize2FreeSlot
focal_class.modifiers: final
focal_class.parameters: (final int size)
focal_class.return: int
focal_class.signature: int freePhysRecSize2FreeSlot(final int size)
focal_class.class_method_signature: StorageDirect.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: StorageDirect.isClosed()
focal_class.full_signature: @Override public boolean isClosed()
focal_class.identifier: isClosed
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isClosed()
focal_class.class_method_signature: StorageDirect.recordGet2(long indexValue, Volume data, Serializer<A> serializer)
focal_class.full_signature: protected A recordGet2(long indexValue, Volume data, Serializer<A> serializer)
focal_class.identifier: recordGet2
focal_class.modifiers: protected
focal_class.parameters: (long indexValue, Volume data, Serializer<A> serializer)
focal_class.return: A
focal_class.signature: A recordGet2(long indexValue, Volume data, Serializer<A> serializer)
focal_class.class_method_signature: StorageDirect.freePhysRecPut(final long indexValue)
focal_class.full_signature: protected void freePhysRecPut(final long indexValue)
focal_class.identifier: freePhysRecPut
focal_class.modifiers: protected
focal_class.parameters: (final long indexValue)
focal_class.return: void
focal_class.signature: void freePhysRecPut(final long indexValue)
focal_class.class_method_signature: StorageDirect.findFreePhysSlot(int requiredSize)
focal_class.full_signature: protected long findFreePhysSlot(int requiredSize)
focal_class.identifier: findFreePhysSlot
focal_class.modifiers: protected
focal_class.parameters: (int requiredSize)
focal_class.return: long
focal_class.signature: long findFreePhysSlot(int requiredSize)
focal_class.class_method_signature: StorageDirect.compareAndSwap(long recid, A expectedOldValue, A newValue, Serializer<A> serializer)
focal_class.full_signature: @Override public boolean compareAndSwap(long recid, A expectedOldValue, A newValue, Serializer<A> serializer)
focal_class.identifier: compareAndSwap
focal_class.modifiers: @Override public
focal_class.parameters: (long recid, A expectedOldValue, A newValue, Serializer<A> serializer)
focal_class.return: boolean
focal_class.signature: boolean compareAndSwap(long recid, A expectedOldValue, A newValue, Serializer<A> serializer)
focal_class.class_method_signature: StorageDirect.isReadOnly()
focal_class.full_signature: @Override public boolean isReadOnly()
focal_class.identifier: isReadOnly
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isReadOnly()
focal_class.class_method_signature: StorageDirect.unlinkPhysRecord(long indexVal, long recid)
focal_class.full_signature: protected void unlinkPhysRecord(long indexVal, long recid)
focal_class.identifier: unlinkPhysRecord
focal_class.modifiers: protected
focal_class.parameters: (long indexVal, long recid)
focal_class.return: void
focal_class.signature: void unlinkPhysRecord(long indexVal, long recid)
focal_class.class_method_signature: StorageDirect.compact()
focal_class.full_signature: @Override public void compact()
focal_class.identifier: compact
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void compact()
focal_method.body: final int freePhysRecSize2FreeSlot(final int size){
          if(size>MAX_RECORD_SIZE) throw new IllegalArgumentException("too big record");
          if(size<0) throw new IllegalArgumentException("negative size");
  
          if(size<1535)
              return size-1;
          else if(size == MAX_RECORD_SIZE)
              return NUMBER_OF_PHYS_FREE_SLOT-1;
          else
              return 1535 -1 + (size-1535)/64;
      }
focal_method.class_method_signature: StorageDirect.freePhysRecSize2FreeSlot(final int size)
focal_method.full_signature: final int freePhysRecSize2FreeSlot(final int size)
focal_method.identifier: freePhysRecSize2FreeSlot
focal_method.modifiers: final
focal_method.parameters: (final int size)
focal_method.return: int
focal_method.signature: int freePhysRecSize2FreeSlot(final int size)