blob: 5c70ef9ba8ce1fe1f85a757613d77e7350bf0a3c [file] [log] [blame]
// Copyright 2010 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// Diagram of the internal states used by the Pipeline API to achieve
// idempotent, roll-forward semantics.
digraph {
[nodesep=0.5];
Waiting;
Output [label="Output\nSlot" shape="rectangle"];
Done;
Run [label="Run\nAsync"];
Aborted;
// Synchronous
Waiting -> Output [label="Sync success"];
Output -> Done [label="finalized()"];
Waiting -> Aborted [label="Abort or too\nmany retries"];
// Asynchronous
Waiting -> Run [label="Async run"];
Run -> Output [label="Async success"];
Run -> Aborted [label="Abort and\ntry_cancel()=True"];
// Retry
Waiting -> Waiting [label="Sync failed"];
Run -> Waiting [label="Retry"];
// Finalized before abort
Aborted -> Aborted [label="Always finalized()\nbefore aborted"];
}