Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package datastore | 5 package datastore |
| 6 | 6 |
| 7 // TestingSnapshot is an opaque implementation-defined snapshot type. | 7 // TestingSnapshot is an opaque implementation-defined snapshot type. |
| 8 type TestingSnapshot interface { | 8 type TestingSnapshot interface { |
| 9 ImATestingSnapshot() | 9 ImATestingSnapshot() |
| 10 } | 10 } |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 34 // SetIndexSnapshot(idxSnap) | 34 // SetIndexSnapshot(idxSnap) |
| 35 // | 35 // |
| 36 // But depending on the implementation it may implemented with an atomic | 36 // But depending on the implementation it may implemented with an atomic |
| 37 // operation. | 37 // operation. |
| 38 CatchupIndexes() | 38 CatchupIndexes() |
| 39 | 39 |
| 40 // SetTransactionRetryCount set how many times RunInTransaction will ret ry | 40 // SetTransactionRetryCount set how many times RunInTransaction will ret ry |
| 41 // transaction body pretending transaction conflicts happens. 0 (default ) | 41 // transaction body pretending transaction conflicts happens. 0 (default ) |
| 42 // means commit succeeds on the first attempt (no retries). | 42 // means commit succeeds on the first attempt (no retries). |
| 43 SetTransactionRetryCount(int) | 43 SetTransactionRetryCount(int) |
| 44 | |
| 45 // Consistent controls the eventual consistency behavior of the testing | |
| 46 // implementation. If it is called with true, then this datastore | |
| 47 // implementation will be always-consistent, instead of eventually-consi stent. | |
| 48 // | |
| 49 // By default the datastore is eventually consistent. | |
|
Vadim Sh.
2015/09/24 18:40:11
nit: mention that one has to call CatchupIndexes t
iannucci
2015/09/24 18:59:30
Done
| |
| 50 Consistent(always bool) | |
| 44 } | 51 } |
| OLD | NEW |