pmMDA.NET

OwnerModifiedAction Class

[This is preliminary documentation and subject to change.]

Defines the action for errors while reloading data of paged collections.

For a list of all members of this type, see OwnerModifiedAction Members.

System.Object
   PmMda.Net.Dog.Paging.OwnerModifiedAction

public class OwnerModifiedAction : ICloneable

Remarks

This action defines when to throw a PagingException, whether the local cache should be cleared and whether the local modifications should be cleared. See the ExAction, ClearCache and DiscardModifications properties for further information.

The following table shows the recommended action values for the different types of paged collections.
ExAction ClearCache DiscardModifications Description
PagedSet NeverThrowException false false Reload errors are fully ignored. This means that the developer who iterates over the paged set will not recognise that the owner has been modified. Items in the local cache, which have been removed, will be iterated until they are thrown away because the MaxLoadedItemCount is exceeded. Storing an owner which has been modified by another transaction will result in a PersistenceException.
PagedBag ThrowExceptionOnce true false A PagingException is thrown, the first time items are reloaded and the owner has been stored by another transaction. This means that the storage by other transactions will only be reported once. Local cached items are removed to avoid that removed items are iterated and new items are omitted.
PagedList ThrowExceptionOnce true false A PagingException is thrown, the first time items are reloaded and the owner has been stored by another transaction. This means that the storage by other transactions will only be reported once. Local cached items are removed to avoid that removed items are iterated and new items are omitted.

Note that the action behaviour is dependant from the use case for which the paged collection is used. If the collection will not be modified, it makes sense to ignore all errors (ExAction = ExceptionAction.NeverThrowException). If the collection is used in different threads or multiple users the ExAction should be set to AlwaysThrowException or ThrowExceptionIfModified.

Requirements

Namespace: PmMda.Net.Dog.Paging

Assembly: pmMDA.NET.Common (in pmMDA.NET.Common.dll)

See Also

OwnerModifiedAction Members | PmMda.Net.Dog.Paging Namespace