Class TrivialDBIDFactory

  • All Implemented Interfaces:
    DBIDFactory

    @Priority(100)
    public final class TrivialDBIDFactory
    extends AbstractIntegerDBIDFactory
    Trivial DBID management, that never reuses IDs and just gives them out in sequence. All IDs will be positive.
    Since:
    0.4.0
    Author:
    Erich Schubert
    • Field Detail

      • next

        java.util.concurrent.atomic.AtomicInteger next
        Keep track of the smallest dynamic DBID offset not used.
    • Constructor Detail

      • TrivialDBIDFactory

        public TrivialDBIDFactory()
        Constructor.
    • Method Detail

      • generateSingleDBID

        public DBID generateSingleDBID()
        Description copied from interface: DBIDFactory
        Generate a single DBID.
        Returns:
        A single DBID
      • deallocateSingleDBID

        public void deallocateSingleDBID​(DBIDRef id)
        Description copied from interface: DBIDFactory
        Return a single DBID for reuse.
        Parameters:
        id - DBID to deallocate
      • generateStaticDBIDRange

        public DBIDRange generateStaticDBIDRange​(int size)
        Description copied from interface: DBIDFactory
        Generate a static DBID range.
        Parameters:
        size - Requested size
        Returns:
        DBID range
      • generateStaticDBIDRange

        public DBIDRange generateStaticDBIDRange​(int begin,
                                                 int size)
        Description copied from interface: DBIDFactory
        Generate a static DBID range.
        Parameters:
        begin - Range begin
        size - Requested size
        Returns:
        DBID range
      • deallocateDBIDRange

        public void deallocateDBIDRange​(DBIDRange range)
        Description copied from interface: DBIDFactory
        Deallocate a static DBID range.
        Parameters:
        range - Range to deallocate