Assembly: soss_namedcache (in soss_namedcache.dll) Version: 188.8.131.52
public Task<AsyncReadObjectResult> RetrieveAsync( CachedObjectId id, RetrieveOptions options, LockTicket lockTicket = null, CancellationToken cancellationToken = null )
Public Function RetrieveAsync ( id As CachedObjectId, options As RetrieveOptions, Optional lockTicket As LockTicket = Nothing, Optional cancellationToken As CancellationToken = Nothing ) As Task(Of AsyncReadObjectResult)
- Type: Soss.ClientCachedObjectId
- Type: Soss.ClientRetrieveOptions
A set of RetrieveOptions options that control locking, GeoServer behavior, and read-through logic for the Retrieve call. These options override any default behaviors that are specified at the named cache level.
- lockTicket (Optional)
- Type: Soss.ClientLockTicket
if specified, represents a LockTicket obtained from a previous locking call.
- cancellationToken (Optional)
- Type: System.ThreadingCancellationToken
An optional CancellationToken that can be used to cancel the asynchronous operation.
Return ValueType: TaskAsyncReadObjectResult
an AsyncReadObjectResult instance. If the object is successfully read from the cache, it will available via Object. Otherwise, Object will be null. If the object is locked as a result of this method, a LockTicket representing the state of the lock in the cache will be returned via LockTicket.
|ArgumentNullException||when id is null or options.CreatePolicy.CreatePolicy is null and the object is loaded from a backing store.|
|InvalidOperationException||Thrown when attempting use a read-through operations with a NamedCache that is configured for remote store access.|
|ObjectLockedException||Thrown if options parameter requests a lock but the object is locked by another client.|
|StateServerException||Thrown if ScaleOut StateServer is unavailable or has experienced an internal error.|
|ReadThroughTimeoutException||Thrown if backing store read-through or GeoServer pull replication is used with this NamedCache and the retrieval of the object is delayed beyond the number of retries specified by MaxReadThroughPendingAttempts.|
This method optionally locks the object in SOSS to prevent other clients from updating or removing the object. The UseLocking property is not taken into consideration by this method. If the options parameter requests a lock, this call will block until the lock is acquired or the MaxLockAttempts limit has been met (or the the asynchronous operation is cancelled via cancellationToken). The lock affects both an object and its metadata. The lock can be released through a call to one of the async methods that accept a LockTicket: ReleaseLockAsync(CachedObjectId, LockTicket, CancellationToken) or PutAsync(CachedObjectId, Object, CreatePolicy, PutOptions, LockTicket, CancellationToken) flag set.