|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.entityfs.impl.AbstractFileSystemBuilder<T>
org.entityfs.impl.impl.AbstractFileSystemBuilderImpl<RamFileSystemBuilder>
org.entityfs.ram.RamFileSystemBuilder
public class RamFileSystemBuilder
This is a builder object for building read/write Ram file systems. A Ram file system keeps all file system data in-memory. It can have an optional size limit (other than the Java process' max heap space...).
File data in the Ram file system is partitioned into file segments. The default size of a file segment is 4096 bytes. A file can never occupy less space in memory than its segment size (plus other internal file data (instance variables)).
| Field Summary | |
|---|---|
static int |
DEFAULT_FILE_SEGMENT_SIZE_BYTES
The default file segment size is 4096 bytes. |
static long |
DEFAULT_MAX_FILE_SYSTEM_SIZE_BYTES
The default maximum file system size is -1 bytes (unlimited size). |
| Fields inherited from interface org.entityfs.FileSystemBuilder |
|---|
DEFAULT_BUFFER_SIZE |
| Constructor Summary | |
|---|---|
RamFileSystemBuilder()
Create a builder with default settings: LogAdapter: DefaultLogAdapter.DEFAULT_ADAPTER
EntityValidityControlStrategy: null (the backend is
only accessible through the file system)
|
|
| Method Summary | |
|---|---|
protected AdapterFactory |
createAdapterFactory()
|
protected ChildEntityManagerFactory<EntityImplementation> |
createDefaultChildEntityManagerFactory(FileSystemAdapter fsa,
LogAdapterHolder lah)
|
protected FileSystemImplementation |
createFileSystem(SupportObjects fso,
FileSystemDelegate fsd)
|
protected FileSystemDelegate |
createFileSystemDelegate(FileSystemAdapter fsa)
|
int |
getFileSegmentSizeBytes()
Get the Ram file segment size in bytes. |
long |
getMaxFileSystemSizeBytes()
Get the maximum size of the file system data in bytes. |
boolean |
isLockingSupported()
Does the file system being built support locking? |
protected boolean |
isReadOnly()
|
RamFileSystemBuilder |
setFileSegmentSizeBytes(int noBytes)
Set the size of a Ram file segment. |
RamFileSystemBuilder |
setMaxFileSystemSizeBytes(long size)
Set the maximum size of the file system data in bytes. |
protected Collection<String> |
validate()
|
| Methods inherited from class org.entityfs.impl.impl.AbstractFileSystemBuilderImpl |
|---|
create, enableEvents, getChildEntityManagerFactory, getEventManager, isFileSystemSupportedByAllCapabilities, setChildEntityManagerFactory, setEventManager |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_FILE_SEGMENT_SIZE_BYTES
public static final long DEFAULT_MAX_FILE_SYSTEM_SIZE_BYTES
| Constructor Detail |
|---|
public RamFileSystemBuilder()
LogAdapter: DefaultLogAdapter.DEFAULT_ADAPTEREntityValidityControlStrategy: null (the backend is
only accessible through the file system)
| Method Detail |
|---|
public RamFileSystemBuilder setFileSegmentSizeBytes(int noBytes)
noBytes - The Ram file segment in bytes.
this).public int getFileSegmentSizeBytes()
public RamFileSystemBuilder setMaxFileSystemSizeBytes(long size)
-1 to have "unlimited" maximum size. (The available heap space
for the Java process sets the effective limit.)
The default max file system size is set to -1 ("unlimited" size).
size - The maximum size for the file system. Set to -1 for
"unlimited" size.
this).public long getMaxFileSystemSizeBytes()
-1
if the file system can have "unlimited" size.protected AdapterFactory createAdapterFactory()
createAdapterFactory in class AbstractFileSystemBuilderImpl<RamFileSystemBuilder>
protected ChildEntityManagerFactory<EntityImplementation> createDefaultChildEntityManagerFactory(FileSystemAdapter fsa,
LogAdapterHolder lah)
createDefaultChildEntityManagerFactory in class AbstractFileSystemBuilderImpl<RamFileSystemBuilder>protected FileSystemDelegate createFileSystemDelegate(FileSystemAdapter fsa)
createFileSystemDelegate in class AbstractFileSystemBuilderImpl<RamFileSystemBuilder>
protected FileSystemImplementation createFileSystem(SupportObjects fso,
FileSystemDelegate fsd)
createFileSystem in class AbstractFileSystemBuilderImpl<RamFileSystemBuilder>protected Collection<String> validate()
validate in class AbstractFileSystemBuilder<RamFileSystemBuilder>public boolean isLockingSupported()
FileSystemBuilder
isLockingSupported in interface FileSystemBuilder<RamFileSystemBuilder>true.FileSystemBuilder.enableLocking()protected boolean isReadOnly()
isReadOnly in class AbstractFileSystemBuilderImpl<RamFileSystemBuilder>false, always.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||