LogRecordSequence.BeginReserveAndAppend Yöntem
Tanım
Zaman uyumsuz bir Reserve ve ekleme işlemi başlatır.Begins an asynchronous reserve and append operation.
Aşırı Yüklemeler
BeginReserveAndAppend(ArraySegment<Byte>, SequenceNumber, SequenceNumber, RecordAppendOptions, ReservationCollection, Int64[], AsyncCallback, Object) |
Zaman uyumsuz bir Reserve ve ekleme işlemi başlatır.Begins an asynchronous reserve and append operation. Bu yöntem devralınamaz.This method cannot be inherited. |
BeginReserveAndAppend(IList<ArraySegment<Byte>>, SequenceNumber, SequenceNumber, RecordAppendOptions, ReservationCollection, Int64[], AsyncCallback, Object) |
Zaman uyumsuz bir Reserve ve ekleme işlemi başlatır.Begins an asynchronous reserve and append operation. Bu yöntem devralınamaz.This method cannot be inherited. |
BeginReserveAndAppend(ArraySegment<Byte>, SequenceNumber, SequenceNumber, RecordAppendOptions, ReservationCollection, Int64[], AsyncCallback, Object)
Zaman uyumsuz bir Reserve ve ekleme işlemi başlatır.Begins an asynchronous reserve and append operation. Bu yöntem devralınamaz.This method cannot be inherited.
public:
virtual IAsyncResult ^ BeginReserveAndAppend(ArraySegment<System::Byte> data, System::IO::Log::SequenceNumber nextUndoRecord, System::IO::Log::SequenceNumber previousRecord, System::IO::Log::RecordAppendOptions recordAppendOptions, System::IO::Log::ReservationCollection ^ reservationCollection, cli::array <long> ^ reservations, AsyncCallback ^ callback, System::Object ^ state);
public IAsyncResult BeginReserveAndAppend (ArraySegment<byte> data, System.IO.Log.SequenceNumber nextUndoRecord, System.IO.Log.SequenceNumber previousRecord, System.IO.Log.RecordAppendOptions recordAppendOptions, System.IO.Log.ReservationCollection reservationCollection, long[] reservations, AsyncCallback callback, object state);
abstract member BeginReserveAndAppend : ArraySegment<byte> * System.IO.Log.SequenceNumber * System.IO.Log.SequenceNumber * System.IO.Log.RecordAppendOptions * System.IO.Log.ReservationCollection * int64[] * AsyncCallback * obj -> IAsyncResult
override this.BeginReserveAndAppend : ArraySegment<byte> * System.IO.Log.SequenceNumber * System.IO.Log.SequenceNumber * System.IO.Log.RecordAppendOptions * System.IO.Log.ReservationCollection * int64[] * AsyncCallback * obj -> IAsyncResult
Public Function BeginReserveAndAppend (data As ArraySegment(Of Byte), nextUndoRecord As SequenceNumber, previousRecord As SequenceNumber, recordAppendOptions As RecordAppendOptions, reservationCollection As ReservationCollection, reservations As Long(), callback As AsyncCallback, state As Object) As IAsyncResult
Parametreler
- data
- ArraySegment<Byte>
Kayıt olarak birleştirilecek ve eklenecek olan Byte dizi segmentlerinin listesi.A list of byte array segments that will be concatenated and appended as the record.
- nextUndoRecord
- SequenceNumber
Kullanıcı tarafından belirtilen sırada bir sonraki kaydın sıra numarası.The sequence number of the next record in the user-specified order.
- previousRecord
- SequenceNumber
Önceki sırada bir sonraki kaydın sıra numarası.The sequence number of the next record in Previous order.
- recordAppendOptions
- RecordAppendOptions
RecordAppendOptionsVerilerin nasıl yazılacağını belirten geçerli bir değeri.A valid value of RecordAppendOptions that specifies how the data should be written.
- reservationCollection
- ReservationCollection
Rezervasyonları yapmak için rezervasyon koleksiyonu.The reservation collection to make reservations in.
- reservations
- Int64[]
Bayt cinsinden yapılacak ayırmalar.The reservations to make, in bytes.
- callback
- AsyncCallback
Append tamamlandığında çağrılacak, isteğe bağlı bir zaman uyumsuz geri çağırma.An optional asynchronous callback, to be called when the append is complete.
- state
- Object
Diğer isteklerden gelen bu belirli zaman uyumsuz ekleme isteğini ayırt eden kullanıcı tarafından sağlanmış bir nesne.A user-provided object that distinguishes this particular asynchronous append request from other requests.
Döndürülenler
IAsyncResultHala bekleyen bu zaman uyumsuz işlemi temsil eden bir.An IAsyncResult that represents this asynchronous operation, which could still be pending.
Uygulamalar
Özel durumlar
userRecord
ya da previousRecord
Bu sıra için geçerli değil.userRecord
or previousRecord
is not valid for this sequence.
-veya--or-
data
en büyük kayıt boyutundan daha büyük olduğundan eklenemiyor.data
cannot be appended because it is larger than the maximum record size.
-veya--or-
reservations
Bu kayıt sırası tarafından oluşturulmamış.reservations
was not created by this record sequence.
Bir veya daha fazla bağımsız değişken null
.One or more of the arguments are null
.
userRecord
ya da previousRecord
bu sıranın taban ve son sıra numaraları arasında değil.userRecord
or previousRecord
is not between the base and last sequence numbers of this sequence.
Beklenmeyen bir g/ç özel durumu nedeniyle istek gerçekleştirilemedi.The request could not be performed because of an unexpected I/O exception.
-veya--or-
G/ç cihaz hatası nedeniyle istek gerçekleştirilemedi.The request could not be performed because of an I/O device error.
Kayıt sırası salt okuma erişimiyle açıldığından işlem gerçekleştirilemiyor.The operation cannot be performed because the record sequence was opened with read-only access.
Yöntemi, sırası atıldıktan sonra çağırılır.The method was called after the sequence has been disposed of.
Programın yürütülmesine devam etmek için yeterli bellek yok.There is not enough memory to continue the execution of the program.
Kayıt sırası dolu.The record sequence is full.
Belirtilen günlük dizisine erişim, işletim sistemi tarafından reddedildi.Access for the specified log sequence is denied by the operating system.
' De sığamayacak kadar büyük bir ayırma data
bulunabilir reservations
.No reservation large enough to fit data
can be found in reservations
.
Açıklamalar
IAsyncResult EndReserveAndAppend Append işleminin tamamlandığından ve kaynakların uygun şekilde serbest bırakılabildiğinden emin olmak için bu yöntem tarafından döndürülen yönteme geçmelisiniz.You should pass the IAsyncResult returned by this method to the EndReserveAndAppend method to ensure that the append operation has completed and resources can be freed appropriately. Zaman uyumsuz ekleme sırasında bir hata oluşursa, EndReserveAndAppend Yöntem IAsyncResult Bu yöntem tarafından döndürülen ile çağrılana kadar bir özel durum oluşturulmaz.If an error has occurred during an asynchronous append, an exception is not thrown until the EndReserveAndAppend method is called with the IAsyncResult returned by this method.
Parametresinde bulunan veriler data
, kayıt olarak eklemek için tek bir bayt dizisine birleştirilir.Data contained in the data
parameter will be concatenated into a single byte array for appending as the record. Ancak, kaydı okurken verileri dizi segmentlerine bölmek için bir sağlama yapılmaz.However, no provision is made for splitting data back into array segments when the record is read.
Belirtilen ayırmalar, bir kayıt ekleme işlemi ile bir atomik işlemde, belirtilen ayırma koleksiyonuna eklenir.The specified reservations are added to the provided reservation collection in an atomic operation with a record append operation. Ekleme başarısız olursa, hiçbir alan ayrılmamıştır.If the append fails, no space is reserved.
Normalde, bu yöntem kayıt yazılmadan önce tamamlanabilir.Normally, this method may complete before the record has been written. Bir kaydın yazıldığından emin olmak için, ForceFlush parametresini kullanarak bayrağı belirtin recordAppendOptions
ya da Flush yöntemi çağırın.To ensure that a record has been written, either specify the ForceFlush flag using the recordAppendOptions
parameter, or call the Flush method.
Bir kayıt dizisi aktiften çıkarılmışsa veya geçersiz bir bağımsız değişken geçirirseniz, özel durumlar bu işlem içinde hemen oluşturulur.If a record sequence has been disposed of, or if you pass an invalid argument, exceptions are thrown immediately within this operation. Bir zaman uyumsuz ekleme isteği sırasında oluşan hatalar; Örneğin, g/ç isteği sırasında oluşan bir disk hatası, yöntem çağrıldığında özel durumların oluşmasına neden olur EndReserveAndAppend .Errors that occurred during an asynchronous append request, for example, a disk failure during the I/O request, will result in exceptions being thrown when the EndReserveAndAppend method is called.
Şunlara uygulanır
BeginReserveAndAppend(IList<ArraySegment<Byte>>, SequenceNumber, SequenceNumber, RecordAppendOptions, ReservationCollection, Int64[], AsyncCallback, Object)
Zaman uyumsuz bir Reserve ve ekleme işlemi başlatır.Begins an asynchronous reserve and append operation. Bu yöntem devralınamaz.This method cannot be inherited.
public:
virtual IAsyncResult ^ BeginReserveAndAppend(System::Collections::Generic::IList<ArraySegment<System::Byte>> ^ data, System::IO::Log::SequenceNumber userRecord, System::IO::Log::SequenceNumber previousRecord, System::IO::Log::RecordAppendOptions recordAppendOptions, System::IO::Log::ReservationCollection ^ reservationCollection, cli::array <long> ^ reservations, AsyncCallback ^ callback, System::Object ^ state);
public IAsyncResult BeginReserveAndAppend (System.Collections.Generic.IList<ArraySegment<byte>> data, System.IO.Log.SequenceNumber userRecord, System.IO.Log.SequenceNumber previousRecord, System.IO.Log.RecordAppendOptions recordAppendOptions, System.IO.Log.ReservationCollection reservationCollection, long[] reservations, AsyncCallback callback, object state);
abstract member BeginReserveAndAppend : System.Collections.Generic.IList<ArraySegment<byte>> * System.IO.Log.SequenceNumber * System.IO.Log.SequenceNumber * System.IO.Log.RecordAppendOptions * System.IO.Log.ReservationCollection * int64[] * AsyncCallback * obj -> IAsyncResult
override this.BeginReserveAndAppend : System.Collections.Generic.IList<ArraySegment<byte>> * System.IO.Log.SequenceNumber * System.IO.Log.SequenceNumber * System.IO.Log.RecordAppendOptions * System.IO.Log.ReservationCollection * int64[] * AsyncCallback * obj -> IAsyncResult
Public Function BeginReserveAndAppend (data As IList(Of ArraySegment(Of Byte)), userRecord As SequenceNumber, previousRecord As SequenceNumber, recordAppendOptions As RecordAppendOptions, reservationCollection As ReservationCollection, reservations As Long(), callback As AsyncCallback, state As Object) As IAsyncResult
Parametreler
- data
- IList<ArraySegment<Byte>>
Kayıt olarak birleştirilecek ve eklenecek olan Byte dizi segmentlerinin listesi.A list of byte array segments that will be concatenated and appended as the record.
- userRecord
- SequenceNumber
Kullanıcı tarafından belirtilen sırada bir sonraki kaydın sıra numarası.The sequence number of the next record in the user-specified order.
- previousRecord
- SequenceNumber
Önceki sırada bir sonraki kaydın sıra numarası.The sequence number of the next record in Previous order.
- recordAppendOptions
- RecordAppendOptions
RecordAppendOptionsVerilerin nasıl yazılacağını belirten geçerli bir değeri.A valid value of RecordAppendOptions that specifies how the data should be written.
- reservationCollection
- ReservationCollection
Rezervasyonları yapmak için rezervasyon koleksiyonu.The reservation collection to make reservations in.
- reservations
- Int64[]
Bayt cinsinden yapılacak ayırmalar.The reservations to make, in bytes.
- callback
- AsyncCallback
Append tamamlandığında çağrılacak, isteğe bağlı bir zaman uyumsuz geri çağırma.An optional asynchronous callback, to be called when the append is complete.
- state
- Object
Diğer isteklerden gelen bu belirli zaman uyumsuz ekleme isteğini ayırt eden kullanıcı tarafından sağlanmış bir nesne.A user-provided object that distinguishes this particular asynchronous append request from other requests.
Döndürülenler
IAsyncResultHala bekleyen bu zaman uyumsuz işlemi temsil eden bir.An IAsyncResult that represents this asynchronous operation, which could still be pending.
Uygulamalar
Özel durumlar
Bağımsız değişkenlerden biri veya birkaçı geçersiz.One or more of the arguments is invalid.
Kayıt eklenirken g/ç hatası oluştu.An I/O error occurred while appending the record.
Kayıt sırası, yeni kaydı içerecek veya ayırmayı yapmak için yeterli boş alan yapamadı.The record sequence could not make enough free space to contain the new record, or to make the reservation.
Yöntemi, sırası atıldıktan sonra çağırılır.The method was called after the sequence has been disposed of.
Açıklamalar
IAsyncResult EndReserveAndAppend Append işleminin tamamlandığından ve kaynakların uygun şekilde serbest bırakılabildiğinden emin olmak için bu yöntem tarafından döndürülen yönteme geçmelisiniz.You should pass the IAsyncResult returned by this method to the EndReserveAndAppend method to ensure that the append operation has completed and resources can be freed appropriately. Zaman uyumsuz ekleme sırasında bir hata oluşursa, EndReserveAndAppend Yöntem IAsyncResult Bu yöntem tarafından döndürülen ile çağrılana kadar bir özel durum oluşturulmaz.If an error has occurred during an asynchronous append, an exception is not thrown until the EndReserveAndAppend method is called with the IAsyncResult returned by this method.
Parametresinde bulunan veriler data
, kayıt olarak eklemek için tek bir bayt dizisine birleştirilir.Data contained in the data
parameter will be concatenated into a single byte array for appending as the record. Ancak, kaydı okurken verileri dizi segmentlerine bölmek için bir sağlama yapılmaz.However, no provision is made for splitting data back into array segments when the record is read.
Belirtilen ayırmalar, bir kayıt ekleme işlemi ile bir atomik işlemde, belirtilen ayırma koleksiyonuna eklenir.The specified reservations are added to the provided reservation collection in an atomic operation with a record append operation. Ekleme başarısız olursa, hiçbir alan ayrılmamıştır.If the append fails, no space is reserved.
Normalde, bu yöntem kayıt yazılmadan önce tamamlanabilir.Normally, this method may complete before the record has been written. Bir kaydın yazıldığından emin olmak için, ForceFlush parametresini kullanarak bayrağı belirtin recordAppendOptions
ya da Flush yöntemi çağırın.To ensure that a record has been written, either specify the ForceFlush flag using the recordAppendOptions
parameter, or call the Flush method.
Bir kayıt dizisi aktiften çıkarılmışsa veya geçersiz bir bağımsız değişken geçirirseniz, özel durumlar bu işlem içinde hemen oluşturulur.If a record sequence has been disposed of, or if you pass an invalid argument, exceptions are thrown immediately within this operation. Bir zaman uyumsuz ekleme isteği sırasında oluşan hatalar; Örneğin, g/ç isteği sırasında oluşan bir disk hatası, yöntem çağrıldığında özel durumların oluşmasına neden olur EndReserveAndAppend .Errors that occurred during an asynchronous append request, for example, a disk failure during the I/O request, will result in exceptions being thrown when the EndReserveAndAppend method is called.