File tree Expand file tree Collapse file tree 2 files changed +2
-23
lines changed
src/Symfony/Component/Lock Expand file tree Collapse file tree 2 files changed +2
-23
lines changed Original file line number Diff line number Diff line change 19
19
use MongoDB \Exception \DriverRuntimeException ;
20
20
use MongoDB \Exception \InvalidArgumentException as MongoInvalidArgumentException ;
21
21
use MongoDB \Exception \UnsupportedException ;
22
- use Symfony \Component \Lock \BlockingStoreInterface ;
23
22
use Symfony \Component \Lock \Exception \InvalidArgumentException ;
24
23
use Symfony \Component \Lock \Exception \InvalidTtlException ;
25
24
use Symfony \Component \Lock \Exception \LockAcquiringException ;
26
25
use Symfony \Component \Lock \Exception \LockConflictedException ;
27
26
use Symfony \Component \Lock \Exception \LockExpiredException ;
28
27
use Symfony \Component \Lock \Exception \LockStorageException ;
29
- use Symfony \Component \Lock \Exception \NotSupportedException ;
30
28
use Symfony \Component \Lock \Key ;
29
+ use Symfony \Component \Lock \PersistingStoreInterface ;
31
30
32
31
/**
33
32
* MongoDbStore is a StoreInterface implementation using MongoDB as a storage
46
45
*
47
46
* @author Joe Bennett <joe@assimtech.com>
48
47
*/
49
- class MongoDbStore implements BlockingStoreInterface
48
+ class MongoDbStore implements PersistingStoreInterface
50
49
{
51
50
private $ collection ;
52
51
private $ client ;
@@ -224,14 +223,6 @@ public function save(Key $key)
224
223
$ this ->checkNotExpired ($ key );
225
224
}
226
225
227
- /**
228
- * {@inheritdoc}
229
- */
230
- public function waitAndSave (Key $ key )
231
- {
232
- throw new NotSupportedException (sprintf ('The store "%s" does not support blocking locks. ' , __CLASS__ ));
233
- }
234
-
235
226
/**
236
227
* {@inheritdoc}
237
228
*
Original file line number Diff line number Diff line change 14
14
use MongoDB \Client ;
15
15
use MongoDB \Driver \Exception \ConnectionTimeoutException ;
16
16
use Symfony \Component \Lock \Exception \InvalidArgumentException ;
17
- use Symfony \Component \Lock \Exception \NotSupportedException ;
18
17
use Symfony \Component \Lock \Key ;
19
18
use Symfony \Component \Lock \PersistingStoreInterface ;
20
19
use Symfony \Component \Lock \Store \MongoDbStore ;
@@ -81,17 +80,6 @@ public function testCreateIndex()
81
80
$ this ->assertContains ('expires_at_1 ' , $ indexes );
82
81
}
83
82
84
- public function testNonBlocking ()
85
- {
86
- $ this ->expectException (NotSupportedException::class);
87
-
88
- $ store = $ this ->getStore ();
89
-
90
- $ key = new Key (uniqid (__METHOD__ , true ));
91
-
92
- $ store ->waitAndSave ($ key );
93
- }
94
-
95
83
/**
96
84
* @dataProvider provideConstructorArgs
97
85
*/
You can’t perform that action at this time.
0 commit comments