Enum FeatureServiceSessionType
- java.lang.Object
-
- java.lang.Enum<FeatureServiceSessionType>
-
- com.esri.arcgisruntime.arcgisservices.FeatureServiceSessionType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<FeatureServiceSessionType>
public enum FeatureServiceSessionType extends java.lang.Enum<FeatureServiceSessionType>
An enumeration of the session types that control how multiple users access branch versioned data.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 aTRANSIENT
type; you can change this type toPERSISTENT
at the map or scene level when you load the map or scene.When you switch the
ServiceGeodatabase
version being used viaServiceGeodatabase.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.
- Since:
- 100.10.0
- See Also:
ServiceGeodatabase.getSessionType()
,LoadSettings.getFeatureServiceSessionType()
-
-
Enum Constant Summary
Enum Constants Enum Constant Description PERSISTENT
A session is held open as long as tables are actively reading or writing.TRANSIENT
A momentary session is used during queries and edit operations.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FeatureServiceSessionType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static FeatureServiceSessionType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
TRANSIENT
public static final FeatureServiceSessionType TRANSIENT
A momentary session is used during queries and edit operations.This type of session will avoid holding a lock any longer than necessary, allowing other clients to connect to, query, and edit a version being used by the
ServiceGeodatabase
. Use this type of session when concurrency is more important than data consistency between queries or between concurrent users.This is the default value.
- Since:
- 100.10.0
-
PERSISTENT
public static final FeatureServiceSessionType PERSISTENT
A session is held open as long as tables are actively reading or writing.This type of session will hold a lock on the version the
ServiceGeodatabase
is working with, ensuring data consistency but decreasing concurrency. This will create a persistent lock for both read and edit sessions.During read sessions, a shared lock will be held while tables are connected to the feature service, preventing other clients from editing the version.
During edit sessions, an exclusive lock will be held while edits have been made to the locally cached data, preventing other clients from both reading and editing. When all edits are successfully applied to the service, the exclusive lock is released.
- Since:
- 100.10.0
-
-
Method Detail
-
values
public static FeatureServiceSessionType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (FeatureServiceSessionType c : FeatureServiceSessionType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static FeatureServiceSessionType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-