Click or drag to resize

UserDataCache Class

Represents a secured inter-process cache for a DictionaryTKey, TValue of serialized UserData.
Inheritance Hierarchy
SystemObject
  GSF.IOInterprocessCache
    GSF.SecurityUserDataCache

Namespace: GSF.Security
Assembly: GSF.Security (in GSF.Security.dll) Version: 2.4.181-beta
Syntax
public class UserDataCache : InterprocessCache
View Source

The UserDataCache type exposes the following members.

Constructors
 NameDescription
Public methodUserDataCache(Int32) Creates a new instance of the UserDataCache.
Public methodUserDataCache(Int32, Int32) Creates a new instance of the UserDataCache with the specified number of maximumConcurrentLocks.
Top
Properties
 NameDescription
Public propertyAutoSave Gets or sets flag that determines if InterprocessCache should automatically initiate a save when FileData has been updated.
(Inherited from InterprocessCache)
Public propertyFileData Gets or sets file data for the cache to be saved or that has been loaded.
(Inherited from InterprocessCache)
Public propertyFileName Path and file name for the cache needing inter-process synchronization.
(Inherited from InterprocessCache)
Public propertyItem Gets or sets UserData for given loginID.
Public propertyMaximumConcurrentLocks Gets the maximum concurrent reader locks allowed.
(Inherited from InterprocessCache)
Public propertyMaximumRetryAttempts Maximum retry attempts allowed for loading or saving cache file data.
(Inherited from InterprocessCache)
Public propertyProviderID Gets or sets unique provider ID used to distinguish cached user data that may be different based on provider.
Public propertyReloadOnChange Gets or sets flag that enables system to monitor for changes in FileName and automatically reload FileData.
(Inherited from InterprocessCache)
Public propertyRetryDelayInterval Wait interval, in milliseconds, before retrying load or save of cache file data.
(Inherited from InterprocessCache)
Top
Methods
 NameDescription
Public methodDispose Releases all the resources used by the InterprocessCache object.
(Inherited from InterprocessCache)
Protected methodDispose(Boolean) Releases the unmanaged resources used by the InterprocessCache object and optionally releases the managed resources.
(Inherited from InterprocessCache)
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalize Releases the unmanaged resources before the InterprocessCache object is reclaimed by GC.
(Inherited from InterprocessCache)
Public methodStatic memberGetCurrentCache Loads the UserDataCache for the current local user.
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodHashLoginID Calculates the hash of the loginID used as the key for the user data cache.
Public methodLoad Initiates inter-process synchronized cache file load.
(Inherited from InterprocessCache)
Protected methodLoadFileData Handles deserialization of file from disk; virtual method allows customization (e.g., pre-load decryption and/or data merge).
(Overrides InterprocessCacheLoadFileData(FileStream))
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodSave Initiates inter-process synchronized save of user data cache.
(Overrides InterprocessCacheSave)
Protected methodSaveFileData Handles serialization of file to disk; virtual method allows customization (e.g., pre-save encryption and/or data merge).
(Overrides InterprocessCacheSaveFileData(FileStream, Byte))
Public methodSaveUserData Serializes the userData for the given loginID into the UserDataCache.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Public methodTryGetUserData Attempts to retrieve UserData for given loginID.
Public methodWaitForLoad Blocks current thread and waits for any pending load to complete; wait time is RetryDelayInterval * MaximumRetryAttempts.
(Inherited from InterprocessCache)
Public methodWaitForLoad(Int32) Blocks current thread and waits for specified millisecondsTimeout for any pending load to complete.
(Inherited from InterprocessCache)
Public methodWaitForSave Blocks current thread and waits for any pending save to complete; wait time is RetryDelayInterval * MaximumRetryAttempts.
(Inherited from InterprocessCache)
Public methodWaitForSave(Int32) Blocks current thread and waits for specified millisecondsTimeout for any pending save to complete.
(Inherited from InterprocessCache)
Top
Extension Methods
 NameDescription
Public Extension MethodGetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Top
Remarks
This is a personal user data cache that only contains basic LDAP information for the user. It is used to load the local and Active Directory groups a user is associated with when the user no longer has access to its domain server. This can happen when a laptop that is normally connected to the Active Directory domain gets shutdown then restarted without access to the domain, for example, on an airplane - in this mode the user can successfully still login to the laptop to their using domain account cached by Windows but the groups the user is in will no longer be accessible. If role based security happens to be based on Active Directory groups, this cache will make sure the user can still have needed role based access even when the domain is unavailable. This cache is maintained as a separate user cache from the system level AdoSecurityCache since the user data cache only contains group information and is used by the LdapSecurityProvider which can be used independently of the AdoSecurityProvider.
See Also