public Slot AllocateSlotForNewUserObject(Transaction trans, int id, int length) { Slot slot = AllocateSlot(length); trans.IdSystem().NotifySlotCreated(id, slot, SlotChangeFactory.UserObjects); return(slot); }
public sealed override ByteArrayBuffer ReadBufferById(Transaction trans, int id, bool lastCommitted) { if (id <= 0) { throw new ArgumentException(); } Slot slot = lastCommitted ? trans.IdSystem().CommittedSlot(id) : trans.IdSystem() .CurrentSlot(id); if (DTrace.enabled) { DTrace.SlotRead.LogLength(id, slot); } return(ReadBufferBySlot(slot)); }
public override StatefulBuffer ReadStatefulBufferById(Transaction trans, int id, bool lastCommitted) { if (id <= 0) { throw new ArgumentException("id=" + id); } Slot slot = lastCommitted ? trans.IdSystem().CommittedSlot(id) : trans.IdSystem() .CurrentSlot(id); if (DTrace.enabled) { DTrace.SlotRead.LogLength(id, slot); } return(ReadStatefulBufferBySlot(trans, id, slot)); }
public sealed override bool Delete4(Transaction transaction, ObjectReference @ref , object obj, int cascade, bool userCall) { int id = @ref.GetID(); StatefulBuffer reader = ReadStatefulBufferById(transaction, id); if (reader != null) { if (obj != null) { if ((!ShowInternalClasses()) && Const4.ClassInternal.IsAssignableFrom(obj.GetType ())) { return(false); } } reader.SetCascadeDeletes(cascade); transaction.IdSystem().NotifySlotDeleted(id, SlotChangeFactory.UserObjects); ClassMetadata classMetadata = @ref.ClassMetadata(); classMetadata.Delete(reader, obj); return(true); } return(false); }
public virtual ITransactionalIdSystem IdSystem(Transaction trans) { return(trans.IdSystem()); }
public virtual ITransactionalIdSystem IdSystem(Transaction trans) { return trans.IdSystem(); }
public sealed override int IdForNewUserObject(Transaction trans) { return(trans.IdSystem().NewId(SlotChangeFactory.UserObjects)); }
public Slot AllocateSlotForNewUserObject(Transaction trans, int id, int length) { Slot slot = AllocateSlot(length); trans.IdSystem().NotifySlotCreated(id, slot, SlotChangeFactory.UserObjects); return slot; }
public override bool IsDeleted(Transaction trans, int id) { return(trans.IdSystem().IsDeleted(id)); }
public override StatefulBuffer ReadStatefulBufferById(Transaction trans, int id, bool lastCommitted) { if (id <= 0) { throw new ArgumentException("id=" + id); } Slot slot = lastCommitted ? trans.IdSystem().CommittedSlot(id) : trans.IdSystem() .CurrentSlot(id); if (DTrace.enabled) { DTrace.SlotRead.LogLength(id, slot); } return ReadStatefulBufferBySlot(trans, id, slot); }
public sealed override ByteArrayBuffer ReadBufferById(Transaction trans, int id, bool lastCommitted) { if (id <= 0) { throw new ArgumentException(); } Slot slot = lastCommitted ? trans.IdSystem().CommittedSlot(id) : trans.IdSystem() .CurrentSlot(id); if (DTrace.enabled) { DTrace.SlotRead.LogLength(id, slot); } return ReadBufferBySlot(slot); }
public sealed override int IdForNewUserObject(Transaction trans) { return trans.IdSystem().NewId(SlotChangeFactory.UserObjects); }
public sealed override bool Delete4(Transaction transaction, ObjectReference @ref , object obj, int cascade, bool userCall) { int id = @ref.GetID(); StatefulBuffer reader = ReadStatefulBufferById(transaction, id); if (reader != null) { if (obj != null) { if ((!ShowInternalClasses()) && Const4.ClassInternal.IsAssignableFrom(obj.GetType ())) { return false; } } reader.SetCascadeDeletes(cascade); transaction.IdSystem().NotifySlotDeleted(id, SlotChangeFactory.UserObjects); ClassMetadata classMetadata = @ref.ClassMetadata(); classMetadata.Delete(reader, obj); return true; } return false; }
public override bool IsDeleted(Transaction trans, int id) { return trans.IdSystem().IsDeleted(id); }