public interface FileEntityStoreConfiguration
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.
|
@Optional Property<String> directory()
If no configuration is provided at all, then the default location is
System.getProperty( "user.dir" ) + "/polygene/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.
@Optional Property<Integer> slices()
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.