| | |
| | | /** |
| | | * Executes a write operation. In case of a write operation rollback, implementations may replay the write |
| | | * operation rather than propagate the failure: a {@link WriteOperation} is required to be idempotent for |
| | | * exactly that reason. A replay must be bounded - by a number of attempts, by a window of time, or by both - |
| | | * so that a conflict which does not clear reaches the caller instead of being retried forever. The pluggable |
| | | * backend holds locks across this method, up to the exclusive lock of an entry container, and every thread |
| | | * waiting on one of those locks waits for as long as this method does. |
| | | * exactly that reason. A replay may be bounded - by a number of attempts, by a window of time, or by both - so |
| | | * that a conflict which does not clear reaches the caller, or may go on for as long as the conflict lasts, the |
| | | * way a writer of a lock based engine waits for a lock; an engine which resolves every conflict by a rollback |
| | | * should bound it by time only, since a healthy write under concurrent load loses several in a row. The |
| | | * pluggable backend holds locks across this method, up to the exclusive lock of an entry container, and every |
| | | * thread waiting on one of those locks waits for as long as this method does. |
| | | * <p> |
| | | * A caller that mutates state around this method must handle that bound being spent. Removing an entry from an |
| | | * in-memory map before the write so that a replay still finds the work to do, or reading configuration back out |