public class ValueStore
extends org.openrdf.model.impl.ValueFactoryBase
Modifier and Type | Field and Description |
---|---|
static int |
NAMESPACE_CACHE_SIZE
The default namespace cache size: 64.
|
static int |
NAMESPACE_ID_CACHE_SIZE
The default namespace id cache size: 32.
|
static int |
VALUE_CACHE_SIZE
The default value cache size: 512.
|
static int |
VALUE_ID_CACHE_SIZE
The default value id cache size: 128.
|
Constructor and Description |
---|
ValueStore(File dataDir) |
ValueStore(File dataDir,
boolean forceSync) |
ValueStore(File dataDir,
boolean forceSync,
int valueCacheSize,
int valueIDCacheSize,
int namespaceCacheSize,
int namespaceIDCacheSize,
boolean encrypt) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all values from the ValueStore.
|
void |
close()
Closes the ValueStore, releasing any file references, etc.
|
NativeBNode |
createBNode(String nodeID) |
NativeLiteral |
createLiteral(String value) |
NativeLiteral |
createLiteral(String value,
String language) |
NativeLiteral |
createLiteral(String value,
org.openrdf.model.URI datatype) |
org.openrdf.model.Statement |
createStatement(org.openrdf.model.Resource subject,
org.openrdf.model.URI predicate,
org.openrdf.model.Value object) |
org.openrdf.model.Statement |
createStatement(org.openrdf.model.Resource subject,
org.openrdf.model.URI predicate,
org.openrdf.model.Value object,
org.openrdf.model.Resource context) |
NativeURI |
createURI(String uri) |
NativeURI |
createURI(String namespace,
String localName) |
int |
getID(org.openrdf.model.Value value)
Gets the ID for the specified value.
|
NativeBNode |
getNativeBNode(org.openrdf.model.BNode bnode)
Creates a NativeBNode that is equal to the supplied bnode.
|
NativeLiteral |
getNativeLiteral(org.openrdf.model.Literal l)
Creates an NativeLiteral that is equal to the supplied literal.
|
NativeResource |
getNativeResource(org.openrdf.model.Resource resource) |
NativeURI |
getNativeURI(org.openrdf.model.URI uri)
Creates a NativeURI that is equal to the supplied URI.
|
NativeValue |
getNativeValue(org.openrdf.model.Value value) |
info.aduna.concurrent.locks.Lock |
getReadLock()
Gets a read lock on this value store that can be used to prevent values
from being removed while the lock is active.
|
ValueStoreRevision |
getRevision() |
NativeValue |
getValue(int id)
Gets the value for the specified ID.
|
int |
storeValue(org.openrdf.model.Value value)
Stores the supplied value and returns the ID that has been assigned to
it.
|
void |
sync()
Synchronizes any changes that are cached in memory to disk.
|
public static final int VALUE_CACHE_SIZE
public static final int VALUE_ID_CACHE_SIZE
public static final int NAMESPACE_CACHE_SIZE
public static final int NAMESPACE_ID_CACHE_SIZE
public ValueStore(File dataDir) throws IOException
IOException
public ValueStore(File dataDir, boolean forceSync) throws IOException
IOException
public ValueStore(File dataDir, boolean forceSync, int valueCacheSize, int valueIDCacheSize, int namespaceCacheSize, int namespaceIDCacheSize, boolean encrypt) throws IOException
IOException
public ValueStoreRevision getRevision()
public info.aduna.concurrent.locks.Lock getReadLock() throws InterruptedException
InterruptedException
public NativeValue getValue(int id) throws IOException
id
- A value ID.IOException
- If an I/O error occurred.public int getID(org.openrdf.model.Value value) throws IOException
value
- A value.NativeValue.UNKNOWN_ID
if no such ID could be found.IOException
- If an I/O error occurred.public int storeValue(org.openrdf.model.Value value) throws IOException
value
- The Value to store.IOException
- If an I/O error occurred.public void clear() throws IOException
IOException
- If an I/O error occurred.public void sync() throws IOException
IOException
- If an I/O error occurred.public void close() throws IOException
IOException
- If an I/O error occurred.public NativeBNode createBNode(String nodeID)
public NativeLiteral createLiteral(String value)
public NativeLiteral createLiteral(String value, String language)
public NativeLiteral createLiteral(String value, org.openrdf.model.URI datatype)
public org.openrdf.model.Statement createStatement(org.openrdf.model.Resource subject, org.openrdf.model.URI predicate, org.openrdf.model.Value object)
public org.openrdf.model.Statement createStatement(org.openrdf.model.Resource subject, org.openrdf.model.URI predicate, org.openrdf.model.Value object, org.openrdf.model.Resource context)
public NativeValue getNativeValue(org.openrdf.model.Value value)
public NativeResource getNativeResource(org.openrdf.model.Resource resource)
public NativeURI getNativeURI(org.openrdf.model.URI uri)
public NativeBNode getNativeBNode(org.openrdf.model.BNode bnode)
public NativeLiteral getNativeLiteral(org.openrdf.model.Literal l)
Copyright © 2018 universAAL Consortium. All rights reserved.