Server
in package
Manages some server admin features.
Tags
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()
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
Return values
string —Engine name. Will be mmfiles or rocksdb
isAvailable()
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
Return values
bool —True if server is available. False if not.
logLevel()
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
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()
Returns the role of a server in a cluster.
public
static role(Connection $connection) : string
Parameters
- $connection : Connection
-
Connection object to use.
Tags
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()
Returns the Arango server version.
public
static version(Connection $connection) : string
Parameters
- $connection : Connection
-
Connection object to use.
Tags
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.