CassandraClient

Eclipse Vert.x Cassandra client.

package

Default

Methods

__construct

__construct() 

Connect to a Cassandra service.

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)

Arguments

$arg0

callable | string

$arg1

callable

Response

$this

current Cassandra client instance

Like @see \io\vertx\jphp\cassandra\CassandraClient::createNonShared but with default client options.

createNonShared( $arg0,  $arg1 = null) : \io\vertx\jphp\cassandra\CassandraClient
static

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)

Arguments

$arg0

Vertx

$arg1

array | CassandraClientOptions

Response

\io\vertx\jphp\cassandra\CassandraClient

Like @see \io\vertx\jphp\cassandra\CassandraClient::createShared, but with default client options and datasource.

createShared( $arg0,  $arg1 = null,  $arg2 = null) : \io\vertx\jphp\cassandra\CassandraClient
static

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)

Arguments

$arg0

Vertx

$arg1

string | array | CassandraClientOptions

$arg2

array | CassandraClientOptions

Response

\io\vertx\jphp\cassandra\CassandraClient

Disconnects from the Cassandra service.

disconnect( $arg0 = null) : $this

disconnect()

Disconnects from the Cassandra service.

param $disconnectHandler [callable] handler called when asynchronous disconnect call ends disconnect($disconnectHandler)

Arguments

$arg0

callable

Response

$this

current Cassandra client instance

Execute the query and provide a handler for consuming results.

execute( $arg0,  $arg1) : $this

Arguments

$arg0

string

$arg1

callable

Response

$this

current Cassandra client instance

isConnected

isConnected() : boolean

Response

boolean

whether this Cassandra client instance connected.

Executes the given SQL <code>SELECT</code> statement which returns the results of the query as a read stream.

queryStream( $arg0,  $arg1) : $this

Arguments

$arg0

string

$arg1

callable

Response

$this

current Cassandra client instance

Constants

The name of the default pool

DEFAULT_POOL_NAME
var

php文件只是为了写代码方便,常量的实际值请参考原java文件