Copyright 2015 DataStax, Inc.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. The main entry point to the PHP Driver for Apache Cassandra.

Use Cassandra::cluster() to build a cluster instance. Use Cassandra::ssl() to build SSL options instance.

Constants

CONSISTENCY_ANY

= 0

Consistency level ANY means the request is fulfilled as soon as the data has been written on the Coordinator. Requests with this consistency level are not guranteed to make it to Replica nodes.

See Also:

CONSISTENCY_ONE

= 1

Consistency level ONE gurantess that data has been written to at least one Replica node.

See Also:

CONSISTENCY_LOCAL_ONE

= 10

Same as CONSISTENCY_ONE, but confined to the local data center. This consistency level works only with NetworkTopologyStrategy replication.

See Also:

CONSISTENCY_TWO

= 2

Consistency level TWO gurantess that data has been written to at least two Replica nodes.

See Also:

CONSISTENCY_THREE

= 3

Consistency level THREE gurantess that data has been written to at least three Replica nodes.

See Also:

CONSISTENCY_QUORUM

= 4

Consistency level QUORUM gurantess that data has been written to at least the majority of Replica nodes. How many nodes exactly are a majority depends on the replication factor of a given keyspace and is calculated using the formula ceil(RF / 2 + 1), where ceil is a mathematical ceiling function and RF is the replication factor used. For example, for a replication factor of 5, the majority is ceil(5 / 2 + 1) = 3.

See Also:

CONSISTENCY_LOCAL_QUORUM

= 6

Same as CONSISTENCY_QUORUM, but confined to the local data center. This consistency level works only with NetworkTopologyStrategy replication.

See Also:

CONSISTENCY_EACH_QUORUM

= 7

Consistency level EACH_QUORUM gurantess that data has been written to at least a majority Replica nodes in all datacenters. This consistency level works only with NetworkTopologyStrategy replication.

See Also:

CONSISTENCY_ALL

= 5

Consistency level ALL gurantess that data has been written to all Replica nodes.

See Also:

CONSISTENCY_SERIAL

= 8

This is a serial consistency level, it is used in conditional updates, e.g. (CREATE|INSERT ... IF NOT EXISTS), and should be specified as the serial_consistency option of the Cassandra\ExecutionOptions instance.

Consistency level SERIAL, when set, ensures that a Paxos commit fails if any of the replicas is down.

See Also:

CONSISTENCY_LOCAL_SERIAL

= 9

Same as CONSISTENCY_SERIAL, but confined to the local data center. This consistency level works only with NetworkTopologyStrategy replication.

See Also:

VERIFY_NONE

= 0

Perform no verification of Cassandra nodes when using SSL encryption.

See Also:

VERIFY_PEER_CERT

= 1

Verify presence and validity of SSL certificates of Cassandra.

See Also:

VERIFY_PEER_IDENTITY

= 2

Verify that the IP address matches the SSL certificate’s common name or one of its subject alternative names. This implies the certificate is also present.

See Also:

BATCH_LOGGED

= 0

BATCH_UNLOGGED

= 1

BATCH_COUNTER

= 2

TYPE_TEXT

= ‘text’

When using a map, collection or set of type text, all of its elements must be strings.

See Also:

TYPE_ASCII

= ‘ascii’

When using a map, collection or set of type ascii, all of its elements must be strings.

See Also:

TYPE_VARCHAR

= ‘varchar’

When using a map, collection or set of type varchar, all of its elements must be strings.

See Also:

TYPE_BIGINT

= ‘bigint’

When using a map, collection or set of type bigint, all of its elements must be instances of Cassandra\Bigint.

See Also:

TYPE_BLOB

= ‘blob’

When using a map, collection or set of type blob, all of its elements must be instances of Cassandra\Blob.

See Also:

TYPE_BOOLEAN

= ‘boolean’

When using a map, collection or set of type boolean, all of its elements must be booleans.

See Also:

TYPE_COUNTER

= ‘counter’

When using a map, collection or set of type counter, all of its elements must be instances of Cassandra\Bigint.

See Also:

TYPE_DECIMAL

= ‘decimal’

When using a map, collection or set of type decimal, all of its elements must be instances of Cassandra\Decimal.

See Also:

TYPE_DOUBLE

= ‘double’

When using a map, collection or set of type double, all of its elements must be doubles.

See Also:

TYPE_FLOAT

= ‘float’

When using a map, collection or set of type float, all of its elements must be instances of Cassandra\Float.

See Also:

TYPE_INT

= ‘int’

When using a map, collection or set of type int, all of its elements must be ints.

See Also:

TYPE_TIMESTAMP

= ‘timestamp’

When using a map, collection or set of type timestamp, all of its elements must be instances of Cassandra\Timestamp.

See Also:

TYPE_UUID

= ‘uuid’

When using a map, collection or set of type uuid, all of its elements must be instances of Cassandra\Uuid.

See Also:

TYPE_VARINT

= ‘varint’

When using a map, collection or set of type varint, all of its elements must be instances of Cassandra\Varint.

See Also:

TYPE_TIMEUUID

= ‘timeuuid’

When using a map, collection or set of type timeuuid, all of its elements must be instances of Cassandra\Timeuuid.

See Also:

TYPE_INET

= ‘inet’

When using a map, collection or set of type inet, all of its elements must be instances of Cassandra\Inet.

See Also:

VERSION

= ‘1.0.0-beta’

Current version of the extension.

Methods

static Cluster\Builder

cluster

( )

Returns a Cassandra\Cluster Builder.

Static
This method is static
Returns:
Type Details
Cluster\Builder

a Cassandra\Cluster Builder instance

static SSLOptions\Builder

ssl

( )

Returns SSL Options Builder.

Static
This method is static
Returns:
Type Details
SSLOptions\Builder

an Cassandra\SSLOptions Builder instance