Package com.db4o.io

Class DoublingGrowthStrategy

  • All Implemented Interfaces:
    GrowthStrategy

    public class DoublingGrowthStrategy
    extends java.lang.Object
    implements GrowthStrategy
    Strategy for file/byte array growth that will always double the current size
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long newSize​(long curSize, long requiredSize)
      returns the incremented size after the growth strategy has been applied
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DoublingGrowthStrategy

        public DoublingGrowthStrategy()
    • Method Detail

      • newSize

        public long newSize​(long curSize,
                            long requiredSize)
        Description copied from interface: GrowthStrategy
        returns the incremented size after the growth strategy has been applied
        Specified by:
        newSize in interface GrowthStrategy
        Parameters:
        curSize - the original size
        Returns:
        the new size, after the growth strategy has been applied, must be bigger than curSize