File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33namespace Clue \React \Redis ;
44
55use Evenement \EventEmitterInterface ;
6+ use React \Promise \PromiseInterface ;
7+ use Clue \Redis \Protocol \Model \ModelInterface ;
68
9+ /**
10+ * Simple interface for executing redis commands
11+ *
12+ * @event message(ModelInterface $model, Client $thisClient)
13+ */
714interface Client extends EventEmitterInterface
815{
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+ */
926 public function __call ($ name , $ args );
1027
28+ /**
29+ * Checks if the client is busy, i.e. still has any requests pending
30+ *
31+ * @return boolean
32+ */
1133 public function isBusy ();
1234
1335 /**
@@ -18,5 +40,10 @@ public function isBusy();
1840 */
1941 public function end ();
2042
43+ /**
44+ * close connection immediately
45+ *
46+ * @see self::end() for closing the connection once the client is idle
47+ */
2148 public function close ();
2249}
You can’t perform that action at this time.
0 commit comments