public void Process() { Hashtable result = null; CallbackEntry cbEntry = null; if (((_entries != null) && (_entries[0] != null)) && (_entries[0].Value is CallbackEntry)) { cbEntry = _entries[0].Value as CallbackEntry; } try { result = _parent.WriteThru(_internalCache, _keys as string[], _values, _entries, new Hashtable(), _opCode, new OperationContext(OperationContextFieldName.OperationType, OperationContextOperationType.CacheOperation)); if (result == null) { result = new Hashtable(_keys.Length); } if (cbEntry != null) { for (int i = 0; i < _keys.Length; i++) { if (!result.ContainsKey(_keys[i])) { result.Add(_keys[i], "1"); } } } } catch (Exception exception) { _internalCache.Context.Logger.Error("WriteBehindTask.Process".GetFormatter(), exception.GetFormatter()); if (cbEntry != null) { for (int j = 0; j < _keys.Length; j++) { result.Add(_keys[j], exception); } } } if (cbEntry != null) { try { _internalCache.NotifyWriteBehindTaskStatus(_opCode, result, cbEntry, _taskId, _providerName, new OperationContext(OperationContextFieldName.OperationType, OperationContextOperationType.CacheOperation)); } catch { } } }
public void Process() { Hashtable result = new Hashtable(1); string key = _key as string; CallbackEntry cbEntry = null; if (_opCode == OpCode.Clear) { key = string.Empty; } try { bool flag = _parent.WriteThru(_internalCache, key, _entry, _opCode, new OperationContext(OperationContextFieldName.OperationType, OperationContextOperationType.CacheOperation)); _internalCache.DoWrite("IWriteBehindTask.Process", "taskId=" + _taskId + "operation result=" + (flag ? "true" : "false"), new OperationContext(OperationContextFieldName.OperationType, OperationContextOperationType.CacheOperation)); result.Add(key, flag ? "1" : "0"); } catch (Exception exception) { if (_internalCache.Context.Logger.IsErrorEnabled) { _internalCache.Context.Logger.Error(("WriteBehindTask.Process: " + exception.Message).GetFormatter()); } result.Add(key, exception); } if ((_entry != null) && (_entry.Value is CallbackEntry)) { cbEntry = _entry.Value as CallbackEntry; } try { _internalCache.NotifyWriteBehindTaskStatus(_opCode, result, cbEntry, _taskId, _providerName, new OperationContext(OperationContextFieldName.OperationType, OperationContextOperationType.CacheOperation)); } catch { } }