org.red5.server.api.persistence

## Interface IPersistenceStore

All Known Implementing Classes:
  FilePersistence, RamPersistence

    public interface IPersistenceStore

Storage for persistent objects.

Author:
  The Red5 Project (red5@osflash.org), Luke Hubbard (luke@codegent.com), Joachim Bauch (jojo@struktur.de)

### Method Summary

Methods
`Set<String>` `getObjectNames()` Return iterator over the names of all already loaded objects in the storage.
`Collection<IPersistable>` `getObjects()` Return iterator over the already loaded objects in the storage.
`boolean` `load(IPersistable obj)` Load state of an already instantiated persistent object.
`IPersistable` `load(String name)` Load a persistent object with the given name.
`void` `notifyClose()` Notify store that it's being closed.
`boolean` `remove(IPersistable obj)` Delete the passed persistent object.
`boolean` `remove(String name)` Delete the persistent object with the given name.
`boolean` `save(IPersistable obj)` Persist given object.

### Method Detail

#### save

    boolean save(IPersistable obj)

Persist given object.

Parameters:
  `obj` - Object to store
Returns:
  `true` on success, `false` otherwise

#### load

    IPersistable load(String name)

Load a persistent object with the given name. The object must provide either a constructor that takes an input stream as only parameter or an empty constructor so it can be loaded from the persistence store.

Parameters:
  `name` - the name of the object to load
Returns:
  The loaded object or `null` if no such object was found

#### load

    boolean load(IPersistable obj)

Load state of an already instantiated persistent object.

Parameters:
  `obj` - the object to initializ
Returns:
  true if the object was initialized, false otherwise

#### remove

    boolean remove(IPersistable obj)

Delete the passed persistent object.

Parameters:
  `obj` - the object to delete
Returns:
  `true` if object was persisted and thus can be removed, `false` otherwise

#### remove

    boolean remove(String name)

Delete the persistent object with the given name.

Parameters:
  `name` - the name of the object to delete
Returns:
  `true` if object was persisted and thus can be removed, `false` otherwise

#### getObjectNames

    Set<String> getObjectNames()

Return iterator over the names of all already loaded objects in the storage.

Returns:
  Set of all object names

#### getObjects

    Collection<IPersistable> getObjects()

Return iterator over the already loaded objects in the storage.

Returns:
  Set of all objects

#### notifyClose

    void notifyClose()

Notify store that it's being closed. This allows the store to write any pending objects to disk.