Table of Contents

Property FastReadVersion

Namespace
Scaleout.Client
Assembly
Scaleout.Client.dll

FastReadVersion

For use in invoke callbacks. Indicates whether a "fast read" should be attempted, allowing an object to be returned directly from the in-process client cache without first doing a round trip to the authoritative ScaleOut service for a version check. Set to Empty (the default) to disable fast reads. Default is Empty.

public VersionToken FastReadVersion { readonly get; set; }

Property Value

VersionToken

Remarks

This property is intended for use by Invoke and SingleObjectInvoke event handlers, when the ScaleOut service provides a VersionToken to the callback that indicates the current version of the operation's targeted object via FastReadVersion. The supplied version token can then be applied to this ReadOptions property, instructing the cache to attempt avoiding a server version check during object retrieval if the supplied version already exists in the in-process client cache.

Note that using fast reads introduces the slim possibility of a race: another client/caller may update the targeted object in the brief interval between the ScaleOut service supplying the version to an invoke callback and that callback's subsequent read. This would cause a stale object to be returned to the fast read caller. Fast reads should therefore only be used in invoke callbacks when external updates are not used or when stale reads are acceptable to business requirements.

This property is ignored when an exclusive locking read is performed, such as a ReadExclusive(TKey, ReadOptions, CancellationToken) operation.