File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
14
15
+ use std:: time:: Duration ;
16
+
15
17
use map_api:: MapApi ;
16
18
17
19
use crate :: ExpireKey ;
@@ -49,6 +51,20 @@ pub trait StateMachineApi<SysData>: Send + Sync {
49
51
/// Returns a mutable reference to the map that stores expired key data.
50
52
fn expire_map_mut ( & mut self ) -> & mut Self :: ExpireMap ;
51
53
54
+ /// The timestamp since which to start cleaning expired keys.
55
+ ///
56
+ /// The timestamp is the duration since the Unix epoch.
57
+ /// Applications should save this timestamp when using storage with tombstones
58
+ /// that persist across cleanup rounds.
59
+ fn cleanup_start_timestamp ( & self ) -> Duration ;
60
+
61
+ /// Set the timestamp since which to start cleaning expired keys.
62
+ ///
63
+ /// The timestamp is the duration since the Unix epoch.
64
+ /// Applications should save this timestamp when using storage with tombstones
65
+ /// that persist across cleanup rounds.
66
+ fn set_cleanup_start_timestamp ( & mut self , timestamp : Duration ) ;
67
+
52
68
/// Returns a mutable reference to the system data.
53
69
///
54
70
/// This method provides read-write access to the system data, which includes
You can’t perform that action at this time.
0 commit comments