public class BlueprintsNeo4jOptionsBuilder extends AbstractBlueprintsOptionsBuilder<BlueprintsNeo4jOptionsBuilder,BlueprintsNeo4jOptions>
AbstractBlueprintsOptionsBuilder
that creates Blueprints Neo4j specific options.
This builder contains methods to set the Neo4j cache type, the low-level buffer sizes, and the use of memory mapped
files. The graph type is automatically set to BlueprintsNeo4jResourceOptions.GRAPH_TYPE_NEO4J
in the builder
constructor.
All features are all optional: options can be created using all or none of them.
BlueprintsNeo4jResourceOptions
Modifier | Constructor and Description |
---|---|
protected |
BlueprintsNeo4jOptionsBuilder()
Constructs a new
BlueprintsNeo4jOptionsBuilder and sets the graph type to
BlueprintsNeo4jResourceOptions.GRAPH_TYPE_NEO4J . |
Modifier and Type | Method and Description |
---|---|
BlueprintsNeo4jOptionsBuilder |
arraysMappedBuffer(String size)
Adds the
arrays mapped memory property in the created options. |
protected BlueprintsNeo4jOptionsBuilder |
cache(BlueprintsNeo4jResourceOptions.CacheType type)
Adds the
cache type feature in the created options. |
BlueprintsNeo4jOptionsBuilder |
memoryMappedBuffers()
Adds the
memory mapped buffer feature in the created options. |
BlueprintsNeo4jOptionsBuilder |
memoryMappedBuffers(boolean memoryBuffers)
Adds the
memory mapped buffer feature to the given value in the created options. |
static BlueprintsNeo4jOptionsBuilder |
newBuilder()
Constructs a new
BlueprintsNeo4jOptionsBuilder instance. |
BlueprintsNeo4jOptionsBuilder |
noCache()
Adds the
no cache feature in the created options. |
BlueprintsNeo4jOptionsBuilder |
nodesMappedBuffer(String size)
Adds the
node mapped memory property in the created options. |
BlueprintsNeo4jOptionsBuilder |
propertiesMappedBuffer(String size)
Adds the
property mapped memory property in the created options. |
BlueprintsNeo4jOptionsBuilder |
relationshipsMappedBuffer(String size)
Adds the
relationship mapped memory property in the created options. |
BlueprintsNeo4jOptionsBuilder |
softCache()
Adds the
soft cache feature in the created options. |
BlueprintsNeo4jOptionsBuilder |
stringsMappedBuffer(String size)
Adds the
string mapped memory property in the created options. |
BlueprintsNeo4jOptionsBuilder |
strongCache()
Adds the
strong cache feature in the created options. |
BlueprintsNeo4jOptionsBuilder |
weakCache()
Adds the
weak cache feature in the created options. |
autocommit, autocommit, directWrite, directWriteCacheMany, graph
asMap, cacheFeatures, cacheIsSet, cacheSizes, countLoadedObjects, log, noOption, option, storeOption, validate
protected BlueprintsNeo4jOptionsBuilder()
BlueprintsNeo4jOptionsBuilder
and sets the graph type to
BlueprintsNeo4jResourceOptions.GRAPH_TYPE_NEO4J
.
This constructor is protected for API consistency purpose, to create a new builder use newBuilder()
.
@Nonnull public static BlueprintsNeo4jOptionsBuilder newBuilder()
BlueprintsNeo4jOptionsBuilder
instance.@Nonnull protected BlueprintsNeo4jOptionsBuilder cache(BlueprintsNeo4jResourceOptions.CacheType type)
cache type
feature in the created options.type
- the BlueprintsNeo4jResourceOptions.CacheType
to setBlueprintsNeo4jResourceOptions.CacheType
@Nonnull public BlueprintsNeo4jOptionsBuilder noCache()
no cache
feature in the created options. This tells Neo4j to disable all its caches.BlueprintsNeo4jResourceOptions.CacheType.NONE
@Nonnull public BlueprintsNeo4jOptionsBuilder softCache()
soft cache
feature in the created options. This tells Neo4j to use a cache containing soft
values.BlueprintsNeo4jResourceOptions.CacheType.SOFT
@Nonnull public BlueprintsNeo4jOptionsBuilder weakCache()
weak cache
feature in the created options. This tells Neo4j to use a cache containing weak
values.BlueprintsNeo4jResourceOptions.CacheType.WEAK
@Nonnull public BlueprintsNeo4jOptionsBuilder strongCache()
strong cache
feature in the created options. This tells Neo4j to use a cache containing string
references.
Using this option the created cache cannot be garbage collected, and OutOfMemoryError
can occur if there
is not enough memory to handle the model.
BlueprintsNeo4jResourceOptions.CacheType.STRONG
@Nonnull public BlueprintsNeo4jOptionsBuilder memoryMappedBuffers()
memory mapped buffer
feature in the created options. If the operating system supports memory
mapped files Neo4j will use them to speed up read/write operations.BlueprintsNeo4jResourceOptions.USE_MEMORY_MAPPED_BUFFERS
@Nonnull public BlueprintsNeo4jOptionsBuilder memoryMappedBuffers(boolean memoryBuffers)
memory mapped buffer
feature to the given value in the created options.memoryBuffers
- true to enable memory mapped buffers
, false otherwiseBlueprintsNeo4jResourceOptions.USE_MEMORY_MAPPED_BUFFERS
@Nonnull public BlueprintsNeo4jOptionsBuilder stringsMappedBuffer(String size)
string mapped memory
property in the created options. This tells Neo4j the size of the buffer to
allocate to handle strings.size
- the size of the buffer in megabytesBlueprintsNeo4jResourceOptions.STRINGS_MAPPED_MEMORY
@Nonnull public BlueprintsNeo4jOptionsBuilder arraysMappedBuffer(String size)
arrays mapped memory
property in the created options. This tells Neo4j the size of the buffer to
allocate to handle arrays.size
- the size of the buffer in megabytesBlueprintsNeo4jResourceOptions.ARRAYS_MAPPED_MEMORY
@Nonnull public BlueprintsNeo4jOptionsBuilder nodesMappedBuffer(String size)
node mapped memory
property in the created options. This tells Neo4j the size of the buffer to
allocate to handle nodes.size
- the size of the buffer in megabytesBlueprintsNeo4jResourceOptions.NODES_MAPPED_MEMORY
@Nonnull public BlueprintsNeo4jOptionsBuilder propertiesMappedBuffer(String size)
property mapped memory
property in the created options. This tells Neo4j the size of the buffer
to allocate to handle properties.size
- the size of the buffer in megabytesBlueprintsNeo4jResourceOptions.PROPERTIES_MAPPED_MEMORY
@Nonnull public BlueprintsNeo4jOptionsBuilder relationshipsMappedBuffer(String size)
relationship mapped memory
property in the created options. This tells Neo4j the size of the
buffer to allocate to handle properties.size
- the size of the buffer in megabytesBlueprintsNeo4jResourceOptions.RELATIONSHIPS_MAPPED_MEMORY
Copyright © 2013–2017 Atlanmod INRIA LINA Mines Nantes. All rights reserved.