Menu

## Admin
in package

Abstract Yes
Admin.php : 24

Manages some Admin features.

##### Tags

author

  Lucas S. Vieira

### Table of Contents

#### Methods

flushWal() : bool
  Flushes the <b>write-ahead log</b>. By flushing the currently active write-ahead logfile, the data in it can be transferred to collection journals and datafiles. This is useful to ensure that all data for a collection is present in the collection journals and datafiles, for example, when dumping the data of a collection.
statistics() : array<string|int, mixed>
  Returns the statistics information.
tasks() : mixed
  Returns all tasks of server information.
time() : float
  Returns the system time.
user() : User|bool
  Finds a user on server.
walProperties() : array<string|int, mixed>
  Retrieves the configuration of the <b>write-ahead log</b>.
walTransactions() : array<string|int, mixed>
  Returns information about the currently running transactions.

### Methods

#### flushWal()

Admin.php : 147

Flushes the <b>write-ahead log</b>. By flushing the currently active write-ahead logfile, the data in it can be transferred to collection journals and datafiles. This is useful to ensure that all data for a collection is present in the collection journals and datafiles, for example, when dumping the data of a collection.

`public static flushWal(Connection $connection[, bool $waitForSync = true ][, bool $waitForCollector = true ]) : bool`

##### Parameters

$connection : Connection

  Connection object to use.

$waitForSync : bool = true

  If true, the operation should block until the not-yet synchronized data in the write-ahead log was synchronized to disk.

$waitForCollector : bool = true

  If true, the operation should block until the data in the flushed log has been collected by the write-ahead log garbage collector.

##### Tags

throws
  ServerException|GuzzleException

##### Return values

bool —

True if operation was successful. False otherwise.

#### statistics()

Admin.php : 68

Returns the statistics information.

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

##### Parameters

$connection : Connection

  Connection object to use.

##### Tags

throws
  ServerException|GuzzleException

##### Return values

array<string|int, mixed> —

Array with statistics information about server.

#### tasks()

Admin.php : 112

Returns all tasks of server information.

`public static tasks(Connection $connection) : mixed`

##### Parameters

$connection : Connection

  Connection object to use.

##### Tags

throws
  ServerException|GuzzleException|InvalidParameterException|MissingParameterException

##### Return values

mixed —

ArrayList with all tasks from server.

#### time()

Admin.php : 90

Returns the system time.

`public static time(Connection $connection) : float`

##### Parameters

$connection : Connection

  Connection object to use.

##### Tags

throws
  ServerException|GuzzleException

##### Return values

float —

Unix timestamp from server.

#### user()

Admin.php : 36

Finds a user on server.

`public static user(Connection $connection, string $username) : User|bool`

##### Parameters

$connection : Connection

  Connection object to use.

$username : string

  Username of user.

##### Tags

throws
  InvalidParameterException|MissingParameterException|GuzzleException|ServerException

##### Return values

User|bool —

User objects if the user with the given 'username' exists, false if not.

#### walProperties()

Admin.php : 183

Retrieves the configuration of the <b>write-ahead log</b>.

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

The result is a array with the following keys:
allowOversizeEntries: whether or not operations that are bigger than a single logfile can be executed and stored
logfileSize: the size of each write-ahead logfile
historicLogfiles: the maximum number of historic logfiles to keep
reserveLogfiles: the maximum number of reserve logfiles that ArangoDB allocates in the background
syncInterval: the interval for automatic synchronization of not-yet synchronized write-ahead log data (in milliseconds)
throttleWait: the maximum wait time that operations will wait before they get aborted if case of write-throttling (in milliseconds)
throttleWhenPending: the number of unprocessed garbage-collection operations that, when reached, will activate write-throttling. A value of 0 means that write-throttling will not be triggered.

##### Parameters

$connection : Connection

  Connection object to use.

##### Tags

throws
  ServerException|GuzzleException
see
  https://www.arangodb.com/docs/stable/http/miscellaneous-functions.html#retrieves-the-configuration-of-the-write-ahead-log

##### Return values

array<string|int, mixed>

#### walTransactions()

Admin.php : 214

Returns information about the currently running transactions.

`public static walTransactions(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 following parameters:
runningTransactions: number of currently running transactions
minLastCollected: minimum id of the last collected logfile (at the start of each running transaction). This is null if no transaction is running.
minLastSealed: minimum id of the last sealed logfile (at the start of each running transaction). This is null if no transaction is running.

## Search results