예제 #1
0
            public virtual void OnSuccess(Key key)
            {
                int rows = Interlocked.Increment(ref count);

                if (rows == max)
                {
                    try
                    {
                        // All writes succeeded. Run batch queries in parallel.
                        parent.taskSize = 5;
                        parent.BatchExistsArray();
                        parent.BatchExistsSequence();
                        parent.BatchGetArray();
                        parent.BatchGetSequence();
                        parent.BatchGetHeaders();
                    }
                    catch (Exception e)
                    {
                        parent.console.Error("Batch failed: namespace={0} set={1} key={2} exception={3}",
                                             key.ns, key.setName, key.userKey, e.Message);
                    }
                }
            }
예제 #2
0
            public virtual void OnSuccess(Key key)
            {
                int rows = Interlocked.Increment(ref count);

                if (rows == max)
                {
                    try
                    {
                        // All writes succeeded. Run batch queries in parallel.
                        parent.taskSize = 6;
                        parent.BatchExistsArray();
                        parent.BatchExistsSequence();
                        parent.BatchGetArray();
                        parent.BatchGetSequence();
                        parent.BatchGetHeaders();
                        parent.BatchReadComplex();
                    }
                    catch (Exception e)
                    {
                        parent.console.Error("Batch failed: " + e.Message);
                        parent.AllTasksComplete();
                    }
                }
            }