A class for managing subscriptions using <code>LISTEN/UNLISTEN</code> to Postgres channels.
The subscriber manages a single connection to Postgres.
| package |
Default |
|---|
__construct()
actualConnection() : \io\vertx\jphp\pgclient\PgConnection
\io\vertx\jphp\pgclient\PgConnectionthe actual connection to Postgres, it might be {@code null}
channel( $arg0) : \io\vertx\jphp\pgclient\pubsub\PgChannel
close() : void
closed() : boolean
booleanwhether the subscriber is closed
closeHandler( $arg0) : $this
callable
$thisa reference to this, so the API can be used fluently
connect( $arg0) : $this
callable
$thisa reference to this, so the API can be used fluently
reconnectPolicy( $arg0) : $this
When the subscriber is disconnected, the policy function is called with the actual
number of retries and returns an amountOfTime value:
amountOfTime < 0: the subscriber is closed and there is no retryamountOfTime == 0: the subscriber retries to connect immediatelyamountOfTime > 0: the subscriber retries after amountOfTime millisecondsThe default policy does not perform any retries.
callable
$thisa reference to this, so the API can be used fluently
subscriber( $arg0, $arg1) : \io\vertx\jphp\pgclient\pubsub\PgSubscriber
Vertx
PgConnectOptions | array
\io\vertx\jphp\pgclient\pubsub\PgSubscriberthe subscriber