Пример #1
0
            internal YukonDependencyListener(string key, string connString, string queryString, CacheRuntimeContext context, ExpirationHintType hintType, CommandType cmdType, IDictionary cmdParams)
                : base(key, connString, queryString, context.ExpiryMgr.NotifBasedDepManager, context.ExpiryMgr.NotifBasedDepManager, context.NCacheLog, hintType)
            {
                _cmdParams = cmdParams;
                _cmdType   = cmdType;
                _context   = context;

                _notifBasedDepManager = _context.ExpiryMgr.NotifBasedDepManager;
            }
Пример #2
0
 /// <summary>
 /// Reset dependency settings
 /// </summary>
 /// <param name="context"></param>
 /// <returns></returns>
 internal override bool Reset(CacheRuntimeContext context)
 {
     base.Reset(context);
     // todo add manager code for handling NosDB dependency
     _notifBasedDepManager = context.ExpiryMgr.NotifBasedDepManager;
     if (_notifBasedDepManager != null)
     {
         return(_notifBasedDepManager.Add(CacheKey, _conStr, _queryStr, context.IsDbSyncCoordinator, _hintType, CommandType.Text, _cmdParams, _timeOut));// initialize if this node is DbSyncCoordinator
     }
     return(false);
 }
Пример #3
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);
     }
 }
Пример #4
0
        /// <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;
        }
Пример #5
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);
     }
 }
Пример #6
0
        /// <summary>
        /// Performs application-defined tasks associated with freeing, releasing, or
        /// resetting unmanaged resources.
        /// </summary>
        public virtual void Dispose()
        {
            if (_taskExpiry != null)
            {
                _taskExpiry.Cancel();
                _taskExpiry = null;
            }


            if (_cdbSyncMgr != null)
            {
                _cdbSyncMgr.ClearResourcePools();
                //_cdbSyncMgr.Clear();
            }

            if (_notifBasedDepMgr != null)
            {
                _notifBasedDepMgr.EndOperations();
                _notifBasedDepMgr.Dispose(false);
                _notifBasedDepMgr.Clear();
                _notifBasedDepMgr = null;
            }


            lock (_status_mutex)
            {
                _mainIndex.Clear();
                _mainIndex = null;

                _transitoryIndex.Clear();
                _transitoryIndex = null;

                _expirationManagerSize = 0;
            }
            GC.SuppressFinalize(this);
        }
Пример #7
0
 public AsyncOnDepenencyChange(NotificationBasedDependencyManager notif)
 {
     _notificationManager = notif;
 }