Deveel.Data.Store.ObjectStore.EstablishReference C# (CSharp) Метод

EstablishReference() приватный Метод

private EstablishReference ( long id ) : void
id long
Результат void
        private void EstablishReference(long id)
        {
            try {
                lock (fixedList) {
                    // Update the record in the fixed list.
                    IArea block = fixedList.GetRecord(id);
                    var recordPos = block.Position;
                    int status = block.ReadInt4();
                    if (status != 1)
                        throw new Exception("Assertion failed: record is not static.");

                    int refCount = block.ReadInt4();

                    // Set the fixed blob record as complete.
                    block.Position = recordPos + 4;
                    block.WriteInt4(refCount + 1);
                    block.Flush();
                }
            } catch (IOException e) {
                throw new Exception("IO Error: " + e.Message);
            }
        }

Usage Example

Пример #1
0
 public void Establish()
 {
     store.EstablishReference(Id.Id);
 }