Enum FeatureServiceSessionType
An enumeration of the session types that control how multiple users access branch versioned data.
Namespace: Esri.ArcGISRuntime.ArcGISServices
Assembly: Esri.ArcGISRuntime.dll
Syntax
public enum FeatureServiceSessionType
Remarks
Session types — transient and persistent — let you control how multiple viewers and editors access branch versioned feature services. By default, a web map or web scene with branch versioned feature services (a ServiceGeodatabase version) loads as a Transient type; you can change this type to Persistent at the map or scene level when you load the map or scene.
When you switch the ServiceGeodatabase version being used via SwitchVersionAsync(String), a read operation is started on the new version before releasing the previous version. If acquiring a shared lock on the new version fails (for example, if another user is editing the version), an error is raised. This behavior allows you to keep the user connected to the original version when the version they want is not yet available.
For descriptions of additional ways to manage multiple viewers and editors in branch versioned data, such as using multiple tiers of editors, see the ArcGIS Pro discussion on branch version scenarios.
Fields
Name | Description |
---|---|
Persistent | A session is held open as long as tables are actively reading or writing. With a Read operation When a user starts a read operation, a shared lock is placed on the ServiceGeodatabase version at the beginning of the read operation. A shared lock allows multiple users using read operations to access the service feature table at the same time.The shared lock is kept until CloseAsync() or SwitchVersionAsync(String) methods are called. If the ServiceFeatureTable is in ManualCache, you can call ClearCache(Boolean) to end a read session. With an Edit operation When a user starts an edit operation in the list below, an exclusive lock is placed on the affected ServiceFeatureTable at the beginning of the edit operation. An exclusive lock prevents all other users from connecting to the version. They cannot view, query, or edit that version. The lock is held until one of the following methods is called:
If one or more read operations were already being performed on the ServiceFeatureTable when an edit operation began (if a shared lock was already in place), then the shared lock becomes an exclusive lock. When all edit operations are applied successfully, the exclusive lock returns to being a shared lock. A call to CloseAsync() will release an exclusive lock. Note that if the ServiceGeodatabase version requested is the default version, no exclusive lock will be acquired. Edit operations that trigger the locks described above:
|
Transient | A momentary session is used during queries and edit operations. This is the default session type. The server creates an exclusive lock upon an editor's ApplyEditsAsync(), ApplyEditsAsync(CancellationToken) operation and holds the lock only for the duration that it takes that operation to occur. An exclusive lock prevents readers and editors from accessing (connecting to and viewing) the rows affected by the edit in theServiceGeodatabase version during this time, but they can access (connect to, view, query, and edit) other rows in the ServiceGeodatabase version. Use the transient type when concurrency is more important than data consistency between queries or between concurrent users. |
See Also
Applies to
Target | Versions |
---|---|
.NET Standard 2.0 | 100.10 - 100.15 |
.NET 6.0 | 100.13 - 100.15 |
.NET 6.0 Windows | 100.13 - 100.15 |
.NET Framework | 100.10 - 100.15 |
.NET 5 | 100.10 - 100.12 |
.NET Core 3.1 | 100.10 - 100.12 |
Xamarin.Android | 100.10 - 100.15 |
Xamarin.iOS | 100.10 - 100.15 |
UWP | 100.10 - 100.15 |