    import AbstractPersistence from 'yjs/src/Persistence.js'

public class | source

# AbstractPersistence

Abstract persistence class.

## Constructor Summary

Public Constructor
public | constructor () |

## Member Summary

Public Members
public | opts : * |
public | ys : * |

## Method Summary

Public Methods
public | deinit (y: *) |
public | destroy () |
public | persist (y: *): * |
public | removePersistedData (room: *, destroyYjsInstances: boolean) Remove all persisted data that belongs to a room. |
public | retrieve (y: *, model: *, updates: *) |
public | saveStruct (y: *, struct: *) Save struct to update buffer. |
public | saveUpdate (buffer: *) |

## Public Constructors

### public constructor() source

## Public Members

### public opts: * source

### public ys: * source

## Public Methods

### public deinit(y: *) source

#### Params:

Name | Type | Attribute | Description
y | * |  |

### public destroy() source

### public persist(y: *): * source

#### Params:

Name | Type | Attribute | Description
y | * |  |

#### Return:

*

### public removePersistedData(room: *, destroyYjsInstances: boolean) source

Remove all persisted data that belongs to a room. Automatically destroys all Yjs all Yjs instances that persist to the room. If `destroyYjsInstances = false` the persistence functionality will be removed from the Yjs instances.

Must be overwritten!

#### Params:

Name | Type | Attribute | Description
room | * |  |

destroyYjsInstances

boolean

- optional
- default: true

### public retrieve(y: *, model: *, updates: *) source

#### Params:

Name | Type | Attribute | Description
y | * |  |
model | * |  |
updates | * |  |

### public saveStruct(y: *, struct: *) source

Save struct to update buffer. saveUpdate is called when transaction ends

#### Params:

Name | Type | Attribute | Description
y | * |  |
struct | * |  |

### public saveUpdate(buffer: *) source

#### Params:

Name | Type | Attribute | Description
buffer | * |  |