org.qi4j.entitystore.memory

## Class MemoryMapEntityStoreMixin

- java.lang.Object
- - org.qi4j.entitystore.memory.MemoryMapEntityStoreMixin

- All Implemented Interfaces:
    BackupRestore, MapEntityStore, MapEntityStoreActivation

      public class MemoryMapEntityStoreMixin
      extends Object
      implements MapEntityStore, BackupRestore, MapEntityStoreActivation

  In-memory implementation of MapEntityStore.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.qi4j.spi.entitystore.helpers.MapEntityStore

      `MapEntityStore.MapChanger, MapEntityStore.MapChanges`

    - ### Nested classes/interfaces inherited from interface org.qi4j.spi.entitystore.helpers.MapEntityStoreActivation

      `MapEntityStoreActivation.Activator`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MemoryMapEntityStoreMixin()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `activateMapEntityStore()`
    `void` | `applyChanges(MapEntityStore.MapChanges changes)`
    `Input<String,IOException>` | `backup()` Input that allows data from the entity store to be backed up.
    `boolean` | `contains(EntityReference entityReference, EntityDescriptor descriptor)`
    `Input<Reader,IOException>` | `entityStates()`
    `Reader` | `get(EntityReference entityReference)`
    `Output<String,IOException>` | `restore()` Output that allows data to be restored from a backup.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MemoryMapEntityStoreMixin

          public MemoryMapEntityStoreMixin()

  - ### Method Detail

    - #### activateMapEntityStore

          public void activateMapEntityStore()
                                      throws Exception

      Specified by:
        `activateMapEntityStore` in interface `MapEntityStoreActivation`
      Throws:
        `Exception`

    - #### contains

          public boolean contains(EntityReference entityReference,
                         EntityDescriptor descriptor)
                           throws EntityStoreException

      Throws:
        `EntityStoreException`

    - #### get

          public Reader get(EntityReference entityReference)
                     throws EntityStoreException

      Specified by:
        `get` in interface `MapEntityStore`
      Parameters:
        `entityReference` - The reference to the entity that we want to get.
      Returns:
        Entity state Reader
      Throws:
        `EntityStoreException`

    - #### applyChanges

          public void applyChanges(MapEntityStore.MapChanges changes)
                            throws IOException

      Specified by:
        `applyChanges` in interface `MapEntityStore`
      Throws:
        `IOException`

    - #### entityStates

          public Input<Reader,IOException> entityStates()

      Specified by:
        `entityStates` in interface `MapEntityStore`
      Returns:
        All entities state Readers

    - #### backup

          public Input<String,IOException> backup()

      Description copied from interface: `BackupRestore`
      Input that allows data from the entity store to be backed up.
      Specified by:
        `backup` in interface `BackupRestore`
      Returns:
        An Input instance containing the data to back up.

    - #### restore

          public Output<String,IOException> restore()

      Description copied from interface: `BackupRestore`
      Output that allows data to be restored from a backup.
      Specified by:
        `restore` in interface `BackupRestore`
      Returns:
        An Output instance to receive the restored data.