Opens a sequence in the database.
@param txn For a transactional database, an explicit transaction maybe specified, or null may be specified to use auto-commit. For a non-transactional database, null must be specified.
@param key The key {@link DatabaseEntry} of the sequence.
@param config The sequence attributes. If null, default attributes areused.
@return a new Sequence handle.
@throws SequenceExistsException if the sequence record already existsand the {@code SequenceConfig ExclusiveCreate} parameter is true.
@throws SequenceNotFoundException if the sequence record does not existand the {@code SequenceConfig AllowCreate} parameter is false.
@throws OperationFailureException if one of the
Read Operation Failures occurs. If the sequence does not exist and the {@link SequenceConfig#setAllowCreate AllowCreate} parameter is true, then oneof the Write Operation Failures may also occur.
@throws EnvironmentFailureException if an unexpected, internal orenvironment-wide failure occurs.
@throws UnsupportedOperationException if this database is read-only, orthis database is configured for duplicates.
@throws IllegalStateException if the Sequence record is deleted byanother thread during this method invocation, or the database has been closed.
@throws IllegalArgumentException if an invalid parameter is specified,for example, an invalid {@code SequenceConfig} parameter.