public virtual Task <IOperation> Execute(IItemOperation op)
        {
            var node = locator.Locate(op.Key);

            if (!node.IsAlive)
            {
                return(failSingle.Task);
            }

            var retval = node.Enqueue(op);

            ioQueue.Add(node);

            return(retval);
        }
示例#2
0
        public virtual Task <IOperation> Execute(IItemOperation op)
        {
            var node = locator.Locate(op.Key);

            if (node == null)
            {
                new IOException("All nodes are dead");
            }
            if (!node.IsAlive)
            {
                new IOException($"Node {node} is dead");
            }

            var retval = node.Enqueue(op);

            ioQueue.Add(node);

            return(retval);
        }