Exemple #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Cleanup"/> class.
        /// </summary>
        /// <param name="key">The key.</param>
        /// <param name="prio">The prio.</param>
        /// <param name="span">The span.</param>
        /// <param name="hitRatio">The hit ratio.</param>
        /// <param name="usageDatetime">The usage datetime.</param>
        /// <param name="objectSize">Size of the object.</param>
        /// <param name="hybridPoint">The hybrid point.</param>
        public Cleanup(string key, IndexusMessage.CacheItemPriority prio, TimeSpan span, long hitRatio, DateTime usageDatetime, long objectSize, int hybridPoint)
            : this()
        {
            #region Access Log
#if TRACE
            {
                Handler.LogHandler.Tracking("Access Method: " + this.GetType().ToString() + "->" + ((object)MethodBase.GetCurrentMethod()).ToString() + " ;");
            }
#endif
            #endregion Access Log

            this.key           = key;
            this.prio          = prio;
            this.span          = span;
            this.hitRatio      = hitRatio;
            this.usageDatetime = usageDatetime;
            this.objectSize    = objectSize;
            this.hybridPoint   = hybridPoint;
        }
 /// <summary>
 /// Adding an item to cache. Items are added with provided priority <see cref="IndexusMessage.CacheItemPriority"/> and
 /// provided <see cref="DateTime"/>. Items get cleared from cache in case
 /// max. cache factor arrived, cache get refreshed or provided <see cref="DateTime"/>
 /// reached provided <see cref="DateTime"/>. The server takes care of items with provided <see cref="DateTime"/>.
 /// </summary>
 /// <param name="key">The key for cache item</param>
 /// <param name="payload">The payload which is the object itself.</param>
 /// <param name="expires">Identify when item will expire from the cache.</param>
 /// <param name="prio">Item priority - See also <see cref="IndexusMessage.CacheItemPriority"/></param>
 public abstract void Add(string key, byte[] payload, DateTime expires, IndexusMessage.CacheItemPriority prio);
 /// <summary>
 /// Adding an item to cache. Items are added with provided priority <see cref="IndexusMessage.CacheItemPriority"/> and
 /// DateTime.MaxValue. Items are only get cleared from cache in case max. cache factor arrived or the cache get refreshed.
 /// </summary>
 /// <param name="key">The key for cache item</param>
 /// <param name="payload">The payload which is the object itself.</param>
 /// <param name="prio">Item priority - See also <see cref="IndexusMessage.CacheItemPriority"/></param>
 public abstract void Add(string key, object payload, IndexusMessage.CacheItemPriority prio);
 /// <summary>
 /// Adding an item to cache with all possibility options. All overloads are using this
 /// method to add items based on various provided variables. e.g. expire date time,
 /// item priority or to a specific host
 /// </summary>
 /// <param name="key">The key for cache item</param>
 /// <param name="payload">The payload which is the object itself.</param>
 /// <param name="expires">Identify when item will expire from the cache.</param>
 /// <param name="action">The action is always Add item to cache. See also <see cref="IndexusMessage.ActionValue"/> options.</param>
 /// <param name="prio">Item priority - See also <see cref="IndexusMessage.CacheItemPriority"/></param>
 /// <param name="status">The status of the request. See also <see cref="IndexusMessage.StatusValue"/></param>
 /// <param name="host">The host, represents the specific server node.</param>
 internal abstract void Add(string key, byte[] payload, DateTime expires, IndexusMessage.ActionValue action, IndexusMessage.CacheItemPriority prio, IndexusMessage.StatusValue status, string host);
 /// <summary>
 /// Adding an item to cache. Items are added with provided priority <see cref="IndexusMessage.CacheItemPriority"/> and
 /// provided <see cref="DateTime"/>. Items get cleared from cache in case
 /// max. cache factor arrived, cache get refreshed or provided <see cref="DateTime"/>
 /// reached provided <see cref="DateTime"/>. The server takes care of items with provided <see cref="DateTime"/>.
 /// </summary>
 /// <remarks>
 /// Data which is add with DataContractXxx() Methods need to receive Data from cache with DataContractGetXxx() Methods.
 /// </remarks>
 /// <param name="key">The key for cache item</param>
 /// <param name="payload">The payload which is the object itself.</param>
 /// <param name="expires">Identify when item will expire from the cache.</param>
 /// <param name="prio">Item priority - See also <see cref="IndexusMessage.CacheItemPriority"/></param>
 public abstract void DataContractAdd(string key, object payload, DateTime expires, IndexusMessage.CacheItemPriority prio);