File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 3
3
namespace Clue \React \Redis ;
4
4
5
5
use Evenement \EventEmitterInterface ;
6
+ use React \Promise \PromiseInterface ;
7
+ use Clue \Redis \Protocol \Model \ModelInterface ;
6
8
9
+ /**
10
+ * Simple interface for executing redis commands
11
+ *
12
+ * @event message(ModelInterface $model, Client $thisClient)
13
+ */
7
14
interface Client extends EventEmitterInterface
8
15
{
16
+ /**
17
+ * Invoke the given command and return a Promise that will be resolved when the request has been replied to
18
+ *
19
+ * This is a magic method that will be invoked when calling any redis
20
+ * command on this instance.
21
+ *
22
+ * @param string $name
23
+ * @param string[] $args
24
+ * @return PromiseInterface
25
+ */
9
26
public function __call ($ name , $ args );
10
27
28
+ /**
29
+ * Checks if the client is busy, i.e. still has any requests pending
30
+ *
31
+ * @return boolean
32
+ */
11
33
public function isBusy ();
12
34
13
35
/**
@@ -18,5 +40,10 @@ public function isBusy();
18
40
*/
19
41
public function end ();
20
42
43
+ /**
44
+ * close connection immediately
45
+ *
46
+ * @see self::end() for closing the connection once the client is idle
47
+ */
21
48
public function close ();
22
49
}
You can’t perform that action at this time.
0 commit comments