ReservationCollection.Remove(Int64) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Releases a reservation of the specified size, if one has been made. This method cannot be inherited.
public:
virtual bool Remove(long item);
public bool Remove(long item);
abstract member Remove : int64 -> bool
override this.Remove : int64 -> bool
Public Function Remove (item As Long) As Boolean
- item
- Int64
The size of the reservation to release.
true
if a reservation of the specified size was found and removed; otherwise, false
.
No reservation large enough to fit the provided record can be found in the specified reservation collection.
An I/O error occurs when creating the archive snapshot.
The method was called after the sequence has been disposed of.
There is not enough memory to continue the execution of the program.
The record sequence is full.
Access for the specified log store is denied by the operating system.
The following example shows how to manually make a reservation. Notice that this task can only be performed when using the CLFS-based LogRecordSequence class.
ReservationCollection reservations = recordSequence.CreateReservationCollection();
reservations.Add(lengthOfUndoRecord);
try
{
recordSequence.Append(recordData, userSqn, previousSqn, RecordAppendOptions.None);
}
catch (Exception)
{
reservations.Remove(lengthOfUndoRecord);
throw;
}
recordSequence.Append(undoRecordData, userSqn, previousSqn, RecordAppendOptions.ForceFlush, reservations);
Product | Versions |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: