<xml></xml>

Collapse All Expand All Code: All Code: Multiple Code: C# Code: Visual Basic Code: Visual C++ Members: Show All Members: Filtered Members: Filtered Members: Filtered

Berkeley DB .NET API Documentation
Sequence..::.Get Method
Sequence Class See Also Send Feedback

If there are enough cached values in the sequence handle then they will be returned. Otherwise the next value will be fetched from the database and incremented (decremented) by enough to cover the delta and the next batch of cached values.

For maximum concurrency a non-zero cache size should be specified prior to opening the sequence handle and NoSync should be specified for each Get method call.

By default, sequence ranges do not wrap; to cause the sequence to wrap around the beginning or end of its range, set SequenceConfig.Wrap to true.

If P:BackingDatabase was opened in a transaction, calling Get may result in changes to the sequence object; these changes will be automatically committed in a transaction internal to the Berkeley DB library. If the thread of control calling Get has an active transaction, which holds locks on the same database as the one in which the sequence object is stored, it is possible for a thread of control calling Get to self-deadlock because the active transaction's locks conflict with the internal transaction's locks. For this reason, it is often preferable for sequence objects to be stored in their own database.

# Overload List

| Name | Description
--- | --- | ---
| Get(Int32) | Return the next available element in the sequence and change the sequence value by Delta.
| Get(Int32, Transaction) | Return the next available element in the sequence and change the sequence value by Delta.
| Get(Int32, Boolean) | Return the next available element in the sequence and change the sequence value by Delta.

# See Also

Sequence Class
Sequence Members
BerkeleyDB Namespace