Eclipse Vert.x Cassandra client.
package |
Default |
---|
__construct()
connect( $arg0 = null, $arg1 = null) : $this
connect()
Connect to a Cassandra service.
param $connectHandler [callable] handler called when asynchronous connect call ends connect($connectHandler)
Connect to a Cassandra service.
param $keyspace [string] The name of the keyspace to use for the created connection. param $connectHandler [callable] handler called when asynchronous connect call ends connect($keyspace, $connectHandler)
callable | string
callable
$this
current Cassandra client instance
createNonShared( $arg0, $arg1 = null) : \io\vertx\jphp\cassandra\CassandraClient
param $vertx [Vertx] createNonShared($vertx)
Create a Cassandra client which maintains its own data source.
It is not recommended to create several non shared clients in an application. Your application should either use only single non shared client, or use shared client. This is because @see \io\vertx\jphp\cassandra\CassandraClient backed by \com.datastax.driver.core.Session. And Datastax does not recommended to have several \com.datastax.driver.core.Session instances. Better to have only one, and share it. param $vertx [Vertx] the Vert.x instance param $cassandraClientOptions [CassandraClientOptions | array] the options createNonShared($vertx, $cassandraClientOptions)
Vertx
array | CassandraClientOptions
\io\vertx\jphp\cassandra\CassandraClient
createShared( $arg0, $arg1 = null, $arg2 = null) : \io\vertx\jphp\cassandra\CassandraClient
param $vertx [Vertx] createShared($vertx)
Like @see \io\vertx\jphp\cassandra\CassandraClient::createShared, but with default client options.
param $vertx [Vertx] param $datasourceName [string] createShared($vertx, $datasourceName)
Like @see \io\vertx\jphp\cassandra\CassandraClient::createShared, but with datasource name.
param $vertx [Vertx] param $cassandraClientOptions [CassandraClientOptions | array] createShared($vertx, $cassandraClientOptions)
Create a Cassandra client which shares its data source with any other Cassandra clients created with the same data source name.
param $vertx [Vertx] the Vert.x instance param $datasourceName [string] the data source name param $cassandraClientOptions [CassandraClientOptions | array] the options createShared($vertx, $datasourceName, $cassandraClientOptions)
Vertx
string | array | CassandraClientOptions
array | CassandraClientOptions
\io\vertx\jphp\cassandra\CassandraClient
disconnect( $arg0 = null) : $this
disconnect()
Disconnects from the Cassandra service.
param $disconnectHandler [callable] handler called when asynchronous disconnect call ends disconnect($disconnectHandler)
callable
$this
current Cassandra client instance
execute( $arg0, $arg1) : $this
string
callable
$this
current Cassandra client instance
isConnected() : boolean
boolean
whether this Cassandra client instance connected.
queryStream( $arg0, $arg1) : $this
string
callable
$this
current Cassandra client instance
DEFAULT_POOL_NAME
var |
php文件只是为了写代码方便,常量的实际值请参考原java文件 |
---|