Ejemplo n.º 1
0
 public AsyncRecord(AsyncScheduler scheduler, IFuture cacheKeyToEvict, IFuture future)
 {
     this.cacheKeyToEvict = cacheKeyToEvict;
     this.future          = future;
     this.scheduler       = scheduler;
     present       = null;
     asyncState    = AsyncState.Prequeued;
     queuePriority = 0;
     qtpRef        = new AsyncRef(this, "qRef");
 }
Ejemplo n.º 2
0
		public AsyncRecord(AsyncScheduler scheduler, IFuture cacheKeyToEvict, IFuture future)
		{
			this._cacheKeyToEvict = cacheKeyToEvict;
			this._future = future;
			this.scheduler = scheduler;
			this._present = null;
			this.asyncState = AsyncState.Prequeued;
			this.queuePriority = 0;
			this.qtpRef = new AsyncRef(this, "qRef");
		}
Ejemplo n.º 3
0
		public void Flush()
		{
			this.PreflushDispose();
			this.computeAsyncScheduler = new AsyncScheduler(1, "computeScheduler" + this.suffix);
			this.networkAsyncScheduler = new AsyncScheduler(8, "networkScheduler" + this.suffix);
			this.computeCache = new MemoryCache("computeCache" + this.suffix, 100);
			this.networkCache = new MemoryCache("networkCache" + this.suffix);
			this.boundsCache = new MemoryCache("boundsCache" + this.suffix);
			this.asyncCache = new AsyncRecordCache("asyncCache" + this.suffix, true);
			this.documentFetchCache = new MemoryCache("documentCache" + this.suffix, 10000);
		}
Ejemplo n.º 4
0
 public void Flush()
 {
     this.PreflushDispose();
     this.computeAsyncScheduler = new AsyncScheduler(1, "computeScheduler" + this.suffix);
     this.networkAsyncScheduler = new AsyncScheduler(8, "networkScheduler" + this.suffix);
     this.computeCache          = new MemoryCache("computeCache" + this.suffix, 100);
     this.networkCache          = new MemoryCache("networkCache" + this.suffix);
     this.boundsCache           = new MemoryCache("boundsCache" + this.suffix);
     this.asyncCache            = new AsyncRecordCache("asyncCache" + this.suffix, true);
     this.documentFetchCache    = new MemoryCache("documentCache" + this.suffix, 10000);
 }
Ejemplo n.º 5
0
        public void Activate()
        {
            Dictionary <AsyncScheduler, LinkedList <AsyncRef> > dictionary = new Dictionary <AsyncScheduler, LinkedList <AsyncRef> >();

            foreach (AsyncRef current in this.list)
            {
                AsyncScheduler scheduler = current.asyncRecord.GetScheduler();
                if (!dictionary.ContainsKey(scheduler))
                {
                    dictionary[scheduler] = new LinkedList <AsyncRef>();
                }
                dictionary[scheduler].AddLast(current);
            }
            foreach (KeyValuePair <AsyncScheduler, LinkedList <AsyncRef> > current2 in dictionary)
            {
                current2.Key.Activate(current2.Value);
            }
            InterestList.globalInterestCounter.crement(this.list.Count);
        }
Ejemplo n.º 6
0
 public Asynchronizer(AsyncScheduler scheduler, IFuturePrototype innerPrototype)
 {
     this.scheduler      = scheduler;
     this.innerPrototype = innerPrototype;
 }
Ejemplo n.º 7
0
 public static IFuture MakeFuture(AsyncScheduler scheduler, IFuture innerFuture)
 {
     return(new MemCacheFuture(scheduler.GetCache(), new AsynchronizerFuture(scheduler, innerFuture)));
 }
Ejemplo n.º 8
0
		public Asynchronizer(AsyncScheduler scheduler, IFuturePrototype innerPrototype)
		{
			this.scheduler = scheduler;
			this.innerPrototype = innerPrototype;
		}
Ejemplo n.º 9
0
		public static IFuture MakeFuture(AsyncScheduler scheduler, IFuture innerFuture)
		{
			return new MemCacheFuture(scheduler.GetCache(), new AsynchronizerFuture(scheduler, innerFuture));
		}