@@ -517,16 +517,16 @@ pub trait StateStore: AsyncTraitDeps {
517517 thread_id : & EventId ,
518518 ) -> Result < Option < StoredThreadSubscription > , Self :: Error > ;
519519
520- /// Pause the store, releasing all held resources (database connections,
520+ /// Close the store, releasing all held resources (database connections,
521521 /// file descriptors, file locks).
522522 ///
523523 /// In-flight operations complete before this method returns. After it
524- /// returns, operations will fail until [`Self::resume ()`] is called.
525- async fn pause ( & self ) -> Result < ( ) , Self :: Error > ;
524+ /// returns, operations will fail until [`Self::reopen ()`] is called.
525+ async fn close ( & self ) -> Result < ( ) , Self :: Error > ;
526526
527- /// Resume the store after a [`Self::pause ()`], re-acquiring database
527+ /// Reopen the store after a [`Self::close ()`], re-acquiring database
528528 /// connections.
529- async fn resume ( & self ) -> Result < ( ) , Self :: Error > ;
529+ async fn reopen ( & self ) -> Result < ( ) , Self :: Error > ;
530530
531531 /// Perform database optimizations if any are available, i.e. vacuuming in
532532 /// SQLite.
@@ -831,12 +831,12 @@ impl<T: StateStore> StateStore for &T {
831831 ( * self ) . load_thread_subscription ( room, thread_id) . await
832832 }
833833
834- async fn pause ( & self ) -> Result < ( ) , Self :: Error > {
835- ( * self ) . pause ( ) . await
834+ async fn close ( & self ) -> Result < ( ) , Self :: Error > {
835+ ( * self ) . close ( ) . await
836836 }
837837
838- async fn resume ( & self ) -> Result < ( ) , Self :: Error > {
839- ( * self ) . resume ( ) . await
838+ async fn reopen ( & self ) -> Result < ( ) , Self :: Error > {
839+ ( * self ) . reopen ( ) . await
840840 }
841841
842842 async fn optimize ( & self ) -> Result < ( ) , Self :: Error > {
@@ -1139,12 +1139,12 @@ impl<T: StateStore + ?Sized> StateStore for Arc<T> {
11391139 self . deref ( ) . load_thread_subscription ( room, thread_id) . await
11401140 }
11411141
1142- async fn pause ( & self ) -> Result < ( ) , Self :: Error > {
1143- self . deref ( ) . pause ( ) . await
1142+ async fn close ( & self ) -> Result < ( ) , Self :: Error > {
1143+ self . deref ( ) . close ( ) . await
11441144 }
11451145
1146- async fn resume ( & self ) -> Result < ( ) , Self :: Error > {
1147- self . deref ( ) . resume ( ) . await
1146+ async fn reopen ( & self ) -> Result < ( ) , Self :: Error > {
1147+ self . deref ( ) . reopen ( ) . await
11481148 }
11491149
11501150 async fn optimize ( & self ) -> Result < ( ) , Self :: Error > {
@@ -1472,12 +1472,12 @@ impl<T: StateStore> StateStore for EraseStateStoreError<T> {
14721472 self . 0 . remove_thread_subscription ( room, thread_id) . await . map_err ( Into :: into)
14731473 }
14741474
1475- async fn pause ( & self ) -> Result < ( ) , Self :: Error > {
1476- self . 0 . pause ( ) . await . map_err ( Into :: into)
1475+ async fn close ( & self ) -> Result < ( ) , Self :: Error > {
1476+ self . 0 . close ( ) . await . map_err ( Into :: into)
14771477 }
14781478
1479- async fn resume ( & self ) -> Result < ( ) , Self :: Error > {
1480- self . 0 . resume ( ) . await . map_err ( Into :: into)
1479+ async fn reopen ( & self ) -> Result < ( ) , Self :: Error > {
1480+ self . 0 . reopen ( ) . await . map_err ( Into :: into)
14811481 }
14821482
14831483 async fn optimize ( & self ) -> Result < ( ) , Self :: Error > {
@@ -1833,12 +1833,12 @@ impl<T: StateStore> StateStore for SaveLockedStateStore<T> {
18331833 self . store . remove_thread_subscription ( room, thread_id) . await
18341834 }
18351835
1836- async fn pause ( & self ) -> Result < ( ) , Self :: Error > {
1837- self . store . pause ( ) . await
1836+ async fn close ( & self ) -> Result < ( ) , Self :: Error > {
1837+ self . store . close ( ) . await
18381838 }
18391839
1840- async fn resume ( & self ) -> Result < ( ) , Self :: Error > {
1841- self . store . resume ( ) . await
1840+ async fn reopen ( & self ) -> Result < ( ) , Self :: Error > {
1841+ self . store . reopen ( ) . await
18421842 }
18431843
18441844 async fn optimize ( & self ) -> Result < ( ) , Self :: Error > {
0 commit comments