Skip to content
This repository was archived by the owner on Aug 4, 2020. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions sysmanager.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,23 @@ class StrategyClass {
class SystemManager {

/**
* @param string $server the host and port to connect to, in the
* form 'host:port'. Defaults to 'localhost:9160'.
* @param string $servers the hosts and port to connect to, in the
* form of array of 'host:port'. Defaults to array('localhost:9160').
* @param array $credentials if using authentication or authorization with Cassandra,
* a username and password need to be supplied. This should be in the form
* array("username" => username, "password" => password)
* @param int $send_timeout the socket send timeout in milliseconds. Defaults to 15000.
* @param int $recv_timeout the socket receive timeout in milliseconds. Defaults to 15000.
*/
public function __construct($server='localhost:9160',
public function __construct($servers=array('localhost:9160'),
$credentials=NULL,
$send_timeout=15000,
$recv_timeout=15000)
{
$this->conn = new ConnectionWrapper(
NULL, $server, $credentials, True,
$pool = new ConnectionPool(
NULL, $servers, $credentials, True,
$send_timeout, $recv_timeout);
$this->conn = $pool->get();
$this->client = $this->conn->client;
}

Expand Down