private EPCacheEntry GetEPCacheEntry(Object key, Boolean ignoreLock, OperationContext operationContext) { Object lockId = null; ulong version = 0; DateTime time = new DateTime(1970, 1, 1, 0, 0, 0, 0); DateTime lockDate = time.Date; BitSet flagMap = new BitSet(); operationContext.Add(OperationContextFieldName.ReaderBitsetEnum, flagMap); operationContext.Add(OperationContextFieldName.DataFormat, DataFormat.Object); operationContext.Add(OperationContextFieldName.GenerateQueryInfo, true); LockAccessType lockAccessType = LockAccessType.IGNORE_LOCK; if (!ignoreLock) { lockAccessType = LockAccessType.ACQUIRE; } CacheEntry entry = (CacheEntry)_cacheRoot.GetCacheEntry(key, null, null, ref lockId, ref lockDate, EntryProcessorManager.DefaultLockTimeOut, lockAccessType, operationContext, ref version); LockHandle handle = null; if (lockId != null) { handle = new LockHandle(lockId.ToString(), lockDate); } if (entry != null) { CallbackEntry callbackEntry = entry.Value as CallbackEntry; object value = callbackEntry != null ? callbackEntry.Value : entry.Value; if (value != null) { entry.Value = _context.CachingSubSystemDataService.GetCacheData(value, entry.Flag); } } return(new EPCacheEntry(entry, handle)); }
public EPCacheEntry(CacheEntry entry, LockHandle handle) { cacheEntry = entry; lockHandle = handle; }