internal static CacheImpl GetInstance([CallerMemberName] string callerName = "")
        {
            var instance = new CacheImpl();

            InstanceFactory(ref instance, callerName);
            return(instance);
        }
Exemplo n.º 2
0
 public bool IsClusterInStateTransfer()
 {
     if (CacheImpl != null)
     {
         return(CacheImpl.IsClusterInStateTransfer());
     }
     return(false);
 }
Exemplo n.º 3
0
        /// <summary>
        /// Performs application-defined tasks associated with freeing, releasing, or
        /// resetting unmanaged resources.
        /// </summary>
        /// <param name="disposing"></param>
        private void Dispose(bool disposing)
        {
            lock (this)
            {
                if (SerializationContext != null)
                {
                    CompactFormatterServices.UnregisterAllCustomCompactTypes(SerializationContext);
                }


                if (PerfStatsColl != null)
                {
                    PerfStatsColl.Dispose();
                    PerfStatsColl = null;
                }

                if (ExpiryMgr != null)
                {
                    ExpiryMgr.Dispose();
                    ExpiryMgr = null;
                }
                if (MessageManager != null)
                {
                    MessageManager.StopMessageProcessing();
                    MessageManager = null;
                }
                if (CacheImpl != null)
                {
                    CacheImpl.Dispose();
                    CacheImpl = null;
                }
                if (TimeSched != null)
                {
                    TimeSched.Dispose();
                    TimeSched = null;
                }
                if (AsyncProc != null)
                {
                    AsyncProc.Stop();
                    AsyncProc = null;
                }

                if (HealthCollectorTimeSched != null)
                {
                    HealthCollectorTimeSched.Dispose();
                    HealthCollectorTimeSched = null;
                }

                if (disposing)
                {
                    GC.SuppressFinalize(this);
                }
            }
        }
 static partial void InstanceFactory(ref CacheImpl instance, [CallerMemberName] string callerName = "");
Exemplo n.º 5
0
        public VirtualListBase(int numCacheBlocks, int cacheBlockLength)
        {
//			_Count = UninitializedCount;
            Cache = new CacheImpl(InternalLoad, numCacheBlocks, cacheBlockLength, this);
        }
Exemplo n.º 6
0
        /// <summary>
        /// Gets cache from specified native cache object.
        /// </summary>
        /// <param name="nativeCache">Native cache.</param>
        /// <param name="keepPortable">Portable flag.</param>
        /// <returns>
        /// New instance of cache wrapping specified native cache.
        /// </returns>
        public ICache <TK, TV> Cache <TK, TV>(IUnmanagedTarget nativeCache, bool keepPortable = false)
        {
            var cacheImpl = new CacheImpl <TK, TV>(this, nativeCache, _marsh, false, keepPortable, false, false);

            return(new CacheProxyImpl <TK, TV>(cacheImpl));
        }
Exemplo n.º 7
0
 public bool IsClusterAvailableForMaintenance()
 {
     return(CacheImpl.IsClusterAvailableForMaintenance());
 }
Exemplo n.º 8
0
 public bool IsClusterUnderMaintenance()
 {
     return(CacheImpl.IsClusterUnderMaintenance());
 }
Exemplo n.º 9
0
 public void ExitMaintenance()
 {
     CacheImpl.ExitMaintenance(true);
 }