ArcGIS Runtime SDK for iOS: AGSServiceGeodatabase.h File Reference
ArcGIS Runtime SDK for iOS  100.11
AGSServiceGeodatabase.h File Reference

Go to the source code of this file.

Enumerations

enum  AGSFeatureServiceSessionType { AGSFeatureServiceSessionTypeTransient = 0 , AGSFeatureServiceSessionTypePersistent = 1 }
 

Enumeration Type Documentation

◆ AGSFeatureServiceSessionType

The type of read and edit sessions used by an AGSServiceGeodatabase.

The AGSFeatureServiceSessionType applies to both the read and edit sessions.

When the AGSFeatureServiceSessionType is set to AGSFeatureServiceSessionTypePersistent the following rules govern the lock type and duration:

If session is a read session, then a shared lock is acquired when the AGSServiceGeodatabase is loaded and the lock is kept until either closeWithCompletion: (AGSServiceGeodatabase) or switchVersionWithName:completion: (AGSServiceGeodatabase) method is called.

When switchVersionWithName:completion: (AGSServiceGeodatabase) is called, a read session is started on the new version before releasing the session on the previous version. If acquiring a shared lock on the new version fails, an error is returned.

If session is an edit session, then an exclusive lock is acquired (by upgrading the shared lock) at the beginning of a write operation and held until one of the following methods is called:

When all edit operations are applied successfully the exclusive lock is demoted back to a shared lock. A call to closeWithCompletion: (AGSServiceGeodatabase) will release the exclusive lock. Exception: If the current version is the default version, no exclusive lock will be acquired.

The following edit operations are affected by this behavior:

When AGSFeatureServiceSessionType is set to AGSFeatureServiceSessionTypeTransient, no explicit locks are requested.

See also
AGSServiceGeodatabase::sessionType, AGSLoadSettings::featureServiceSessionType
Since
100.10
Enumerator
AGSFeatureServiceSessionTypeTransient 

A momentary session is used during queries and edit operations.

AGSFeatureServiceSessionTypePersistent 

A session is held open as long as tables are actively reading or writing.