/// <summary>
        /// Overloaded Constructor
        /// </summary>
        /// <param name="timeSched"></param>
        public ExpirationManager(IDictionary properties, CacheRuntimeContext context)
        {
            _context   = context;
            _ncacheLog = context.NCacheLog;

            Initialize(properties);
            _cdbSyncMgr = new CacheDbSyncManager(_ncacheLog);
            _cdbSyncMgr.GetCacheID(context.CacheRoot.Name);

            _notifBasedDepMgr = new NotificationBasedDependencyManager(_context);

            _sleepInterval    = ServiceConfiguration.ExpirationBulkRemoveDelay;
            _removeThreshhold = ServiceConfiguration.ExpirationBulkRemoveSize;
        }
Beispiel #2
0
 /// <summary>
 /// Reset dependency settings
 /// </summary>
 /// <param name="context"></param>
 /// <returns></returns>
 internal override bool Reset(CacheRuntimeContext context)
 {
     base.Reset(context);
     _cdbSyncManager       = context.ExpiryMgr.CacheDbSyncManager;
     _notifBasedDepManager = context.ExpiryMgr.NotifBasedDepManager;
     if (_notifBasedDepManager != null)
     {
         return(_notifBasedDepManager.Add(CacheKey, _conStr, _queryStr, context.IsDbSyncCoordinator, _hintType, _cmdType, _cmdParams, 0));// initialize if this node is DbSyncCoordinator
     }
     else
     {
         return(false);
     }
 }
Beispiel #3
0
 /// <summary>
 /// Reset dependency settings
 /// </summary>
 /// <param name="context"></param>
 /// <returns></returns>
 internal override bool Reset(CacheRuntimeContext context)
 {
     try
     {
         base.Reset(context);
         _cdbSyncManager       = context.ExpiryMgr.CacheDbSyncManager;
         _notifBasedDepManager = context.ExpiryMgr.NotifBasedDepManager;
         if (_notifBasedDepManager != null)
         {
             return(_notifBasedDepManager.Add(CacheKey, _conStr, _queryStr, context.IsDbSyncCoordinator, _hintType, _cmdType, _cmdParams, 0));// initialize if this node is DbSyncCoordinator
         }
         else
         {
             return(false);
         }
     }
     catch (System.IO.FileNotFoundException ex)
     {
         throw new Exception("Could not load assembly 'Oracle.DataAccess.dll'. Please make sure Oracle Data Provider for .NET is installed", ex);
     }
 }