Menu

## Server
in package

Abstract Yes
Server.php : 19

Manages some server admin features.

##### Tags

author

  Lucas S. Vieira

### Table of Contents

#### Methods

engine() : string
  Returns the storage engine the server is configured to use.
isAvailable() : bool
  Checks if the Arango server is available for arbitrary operations.<br> (e.g Is not set to read-only mode and isn't a follower on failover setups)<br> If server during startup or during shutdown returns false.
logLevel() : array<string|int, mixed>
  Returns the server's current log level settings.
role() : string
  Returns the role of a server in a cluster.
version() : string
  Returns the Arango server version.

### Methods

#### engine()

Server.php : 55

Returns the storage engine the server is configured to use.

`public static engine(Connection $connection) : string`

(mmfiles or rocksdb)

##### Parameters

$connection : Connection

  Connection object to use.

##### Tags

throws
  GuzzleException|ServerException
see
  https://www.arangodb.com/docs/stable/http/miscellaneous-functions.html#return-server-database-engine-type

##### Return values

string —

Engine name. Will be mmfiles or rocksdb

#### isAvailable()

Server.php : 105

Checks if the Arango server is available for arbitrary operations.<br> (e.g Is not set to read-only mode and isn't a follower on failover setups)<br> If server during startup or during shutdown returns false.

`public static isAvailable(Connection $connection) : bool`

##### Parameters

$connection : Connection

  Connection object to use.

##### Tags

throws
  ServerException|GuzzleException

##### Return values

bool —

True if server is available. False if not.

#### logLevel()

Server.php : 131

Returns the server's current log level settings.

`public static logLevel(Connection $connection) : array<string|int, mixed>`

##### Parameters

$connection : Connection

  Connection object to use.

##### Tags

throws
  ServerException|GuzzleException

##### Return values

array<string|int, mixed> —

An array with the log topics being the object keys, and the log levels being the object values.

#### role()

Server.php : 82

Returns the role of a server in a cluster.

`public static role(Connection $connection) : string`

##### Parameters

$connection : Connection

  Connection object to use.

##### Tags

throws
  GuzzleException|ServerException

##### Return values

string —

The role of server in a cluster. Possible return values for role are:
single: for standalone servers.
coordinator: if server is a coordinator in a cluster.
primary: if the server is a DBServer in a cluster.
secondary: a not used role.
agent: if the server is an Agency node in a cluster.
undefined: if the role cannot be determined.

#### version()

Server.php : 31

Returns the Arango server version.

`public static version(Connection $connection) : string`

##### Parameters

$connection : Connection

  Connection object to use.

##### Tags

throws
  ServerException|GuzzleException

##### Return values

string —

The server version string. The string has the format “major.minor.sub”.
Major and minor will be numeric, and sub may contain a number or a textual version.

## Search results