Source/NFX/ApplicationModel/Volatile/ObjectStoreService.cs
/// <summary>
/// Retrieves an object reference from the store identified by the "key" or returns null if such object does not exist.
/// Object is not going to be persisted as this method provides logical read-only access. If touch=true then object timestamp is updated
/// </summary>
Retrieves an object reference from the store identified by the "key" or returns null if such object does not exist.
Object is not going to be persisted as this method provides logical read-only access. If touch=true then object timestamp is updated
Retrieves an object reference from the store identified by the " key " or returns null if such object does not exist . Object is not going to be persisted as this method provides logical read - only access . If touch = true then object timestamp is updated
public object Fetch(Guid key, bool touch = false)
    {
      if (this.Status != ControlStatus.Active) return null;
      var bucket = getBucket(key);
      ObjectStoreEntry entry = null;
      lock (bucket)
        if (!bucket.TryGetValue(key, out entry)) return null;
      lock (entry)
      {
        if (entry.Status == ObjectStoreEntryStatus.Deleted) return null;
        if (touch)
           entry.LastTime = App.LocalizedTime;
        return entry.Value;
      }
    }
public object Fetch ( Guid key , bool touch = false ) { if ( this . Status != ControlStatus . Active ) return null ; var bucket = getBucket ( key ) ; ObjectStoreEntry entry = null ; lock ( bucket ) if ( ! bucket . TryGetValue ( key , out entry ) ) return null ; lock ( entry ) { if ( entry . Status == ObjectStoreEntryStatus . Deleted ) return null ; if ( touch ) entry . LastTime = App . LocalizedTime ; return entry . Value ; } }
Retrieves an object reference from the store identified by the "key" or returns null if such object does not exist.
Retrieves an object reference from the store identified by the " key " or returns null if such object does not exist .
key
Guid
touch
bool