org.qi4j.entitystore.file

## Interface FileEntityStoreConfiguration

- All Superinterfaces:
    Composite, ConfigurationComposite, Identity

      public interface FileEntityStoreConfiguration
      extends ConfigurationComposite

  Configuration for the FileEntityStoreService

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.qi4j.api.entity.Identity

      `Identity.IdentityMixin`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Property<String>` | `directory()` The directory where the File Entity Store will be keep its persisted state.
    `Property<Integer>` | `slices()` Defines how many slice directories the store should use.

    - ### Methods inherited from interface org.qi4j.api.entity.Identity

      `identity`

- - ### Method Detail

    - #### directory

          @Optional
          Property<String> directory()

      The directory where the File Entity Store will be keep its persisted state.

      If no configuration is provided at all, then the default location is `System.getProperty( "user.dir" ) + "/qi4j/filestore";` . If a configuration is given, the entity store will be placed in the DATA directory, which is operating system specific.

      OS | Location
      --- | ---
      Linux/Unix | {user}/.{application}/data
      OSX | {user}/Library/Application Support/{application}
      Windows | {user}/Application Data/{application}/data

           where;
             {user} = Current User's home directory
             {application} = Application's name, as set in assembly.

      Ignored if the FileConfiguration service is found.

      The content inside this directory should not be modified directly, and doing so may corrupt the data.

      Returns:
        path to data file relative to current path

    - #### slices

          @Optional
          Property<Integer> slices()

      Defines how many slice directories the store should use.

      Many operating systems run into performance problems when the number of files in a directory grows. If you expect a large number of entities in the file entity store, it is wise to set the number of slices (default is 1) to an approximation of the square root of number of expected entities.

      For instance, if you estimate that you will have 1 million entities in the file entity store, you should set the slices to 1000.

      There is an limit of minimum 1 slice and maximum 10,000 slices, and if more slices than that is needed, you are probably pushing this entitystore beyond its capabilities.

      Note that the slices() can not be changed once it has been set, as it would cause the entity store not to find the entities anymore.

      Returns:
        the number of slices for the file entity store.