public final class MemoryFactory extends Object
The memory usage of the resulting data set following initialisation will be consistent. The performance of the data set will be very fast compared to the stream based implementation as all required data is loaded into memory and references between related objects set at initialisation. However overall memory usage will be higher than the stream based implementation on lightly loaded environments.
Initialisation may take several seconds depending on system performance. Initialisation calculates all the references between entities. If initialisation is not performed then references will be calculated when needed. As such avoiding initialisation improves the time taken to create the data set, at the expense of performance for the initial detections. The default setting is to initialise the data set.
For more information see http://51degrees.mobi/Support/Documentation/Java
| Constructor and Description |
|---|
MemoryFactory() |
| Modifier and Type | Method and Description |
|---|---|
static Dataset |
create(byte[] data) |
static Dataset |
create(byte[] data,
boolean init) |
static Dataset |
create(String filename) |
static Dataset |
create(String filename,
boolean init) |
static Dataset |
read(BinaryReader reader,
boolean init) |
public static Dataset create(byte[] data) throws IOException
IOExceptionpublic static Dataset create(byte[] data, boolean init) throws IOException
IOExceptionpublic static Dataset create(String filename) throws IOException
IOExceptionpublic static Dataset create(String filename, boolean init) throws IOException
IOExceptionpublic static Dataset read(BinaryReader reader, boolean init) throws IOException
IOException