Esempio n. 1
0
 /// <summary>
 /// Looks up the cached value by the given key.
 /// </summary>
 /// <param name="cache">grain directory cache to look up results from</param>
 /// <param name="key">key for the lookup</param>
 /// <param name="result">value if the key is found, undefined otherwise</param>
 /// <returns>true if the given key is in the cache</returns>
 public static bool LookUp(this IGrainDirectoryCache cache, GrainId key, out GrainAddress result)
 {
     return(cache.LookUp(key, out result, out _));
 }
Esempio n. 2
0
        /// <summary>
        /// Looks up the cached value by the given key.
        /// </summary>
        /// <param name="cache">grain directory cache to look up results from</param>
        /// <param name="key">key for the lookup</param>
        /// <param name="result">value if the key is found, undefined otherwise</param>
        /// <returns>true iff the the given key is in the cache</returns>
        public static bool LookUp <TValue>(this IGrainDirectoryCache <TValue> cache, GrainId key, out TValue result)
        {
            int version;

            return(cache.LookUp(key, out result, out version));
        }
Esempio n. 3
0
        /// <summary>
        /// Looks up the cached value by the given key.
        /// </summary>
        /// <param name="cache">grain directory cache to look up results from</param>
        /// <param name="key">key for the lookup</param>
        /// <param name="result">value if the key is found, undefined otherwise</param>
        /// <returns>true if the given key is in the cache</returns>
        public static bool LookUp(this IGrainDirectoryCache cache, GrainId key, out IReadOnlyList <Tuple <SiloAddress, ActivationId> > result)
        {
            int version;

            return(cache.LookUp(key, out result, out version));
        }