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 1212// See the License for the specific language governing permissions and
1313// limitations under the License.
1414
15+ use std:: time:: Duration ;
16+
1517use map_api:: MapApi ;
1618
1719use crate :: ExpireKey ;
@@ -49,6 +51,20 @@ pub trait StateMachineApi<SysData>: Send + Sync {
4951 /// Returns a mutable reference to the map that stores expired key data.
5052 fn expire_map_mut ( & mut self ) -> & mut Self :: ExpireMap ;
5153
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+
5268 /// Returns a mutable reference to the system data.
5369 ///
5470 /// This method provides read-write access to the system data, which includes
You can’t perform that action at this time.
0 commit comments