<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [server](./server.md) &gt; [PersistenceManager](./server.persistencemanager.md)

## PersistenceManager class

Manages persistence of player and global data.

**Signature:**

```typescript
export default class PersistenceManager 
```

## Remarks

This class is a singleton accessible with the static property `PersistenceManager.instance`<!-- -->. Convenience methods are also available on the `Player` and `GameServer` classes.

The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `PersistenceManager` class.

## Properties

<table><thead><tr><th>

Property


</th><th>

Modifiers


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[instance](./server.persistencemanager.instance.md)


</td><td>

`static`

`readonly`


</td><td>

[PersistenceManager](./server.persistencemanager.md)


</td><td>


</td></tr>
</tbody></table>

## Methods

<table><thead><tr><th>

Method


</th><th>

Modifiers


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

[getGlobalData(key)](./server.persistencemanager.getglobaldata.md)


</td><td>


</td><td>

Get global data from the data persistence service.


</td></tr>
<tr><td>

[getPlayerData(player)](./server.persistencemanager.getplayerdata.md)


</td><td>


</td><td>

Get player data from the data persistence service.


</td></tr>
<tr><td>

[setGlobalData(key, data)](./server.persistencemanager.setglobaldata.md)


</td><td>


</td><td>

Set global data in the data persistence service. This data is available and shared by all lobbies of your game.


</td></tr>
<tr><td>

[setPlayerData(player, data)](./server.persistencemanager.setplayerdata.md)


</td><td>


</td><td>

Set player data in the data persistence service. This data is persisted even after a player disconnects, and is retrievable no matter the lobby for your game that they join.


</td></tr>
</tbody></table>
