Class NFEDBSequenceIdGenerator

  • All Implemented Interfaces:
    NFEIdGenerator

    public class NFEDBSequenceIdGenerator
    extends java.lang.Object
    implements NFEIdGenerator
    An implementation of NFEIdGeneratiom that uses a database sequence to generate id's
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getIdBufferSize()
      Returns the size of the ID buffer.
      long getNextId()
      Gets the next ID
      void setIdBufferSize​(int idBufferSize)
      Sets the size of the ID buffer size used by this generator.
      • Methods inherited from class java.lang.Object

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

      • NFEDBSequenceIdGenerator

        public NFEDBSequenceIdGenerator​(java.lang.String sequenceName,
                                        NFEDataSource dataSource,
                                        int idBufferSize)
    • Method Detail

      • setIdBufferSize

        public void setIdBufferSize​(int idBufferSize)
        Description copied from interface: NFEIdGenerator
        Sets the size of the ID buffer size used by this generator. There is not guaranteed that the implementation actually uses a buffer.
        Specified by:
        setIdBufferSize in interface NFEIdGenerator
        Parameters:
        idBufferSize - the number of IDs that can contain the buffer
      • getIdBufferSize

        public int getIdBufferSize()
        Description copied from interface: NFEIdGenerator
        Returns the size of the ID buffer. The size is the number of IDs that the buffer can hold or that are reserved.
        Specified by:
        getIdBufferSize in interface NFEIdGenerator
        Returns:
        the size of the ID buffer