Class MemStatementList
java.lang.Object
org.eclipse.rdf4j.sail.memory.model.MemStatementList
A dedicated data structure for storing MemStatement objects, offering operations optimized for their use in the
memory Sail.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(MemStatement st) void
cleanSnapshots
(int currentSnapshot) void
clear()
getExact
(MemResource subject, MemIRI predicate, MemValue object, MemResource context, int snapshot) Iterates through this list and returns the statement that exactly matches the provided arguments.int
An internal method to retrieve the inner array that stores the statements.boolean
isEmpty()
void
remove
(MemStatement st) void
remove
(MemStatement st, int index) void
setPrioritiseCleanup
(boolean prioritiseCleanup) int
size()
-
Constructor Details
-
MemStatementList
public MemStatementList() -
MemStatementList
public MemStatementList(int capacity)
-
-
Method Details
-
size
public int size() -
isEmpty
public boolean isEmpty() -
add
- Throws:
InterruptedException
-
remove
- Throws:
InterruptedException
-
remove
- Throws:
InterruptedException
-
clear
public void clear() -
cleanSnapshots
- Throws:
InterruptedException
-
getExact
public MemStatement getExact(MemResource subject, MemIRI predicate, MemValue object, MemResource context, int snapshot) throws InterruptedException Iterates through this list and returns the statement that exactly matches the provided arguments. The subject, predicate and object should not be null. If the context is null it will match statements with null as their context.- Parameters:
subject
-predicate
-object
-context
-snapshot
-- Returns:
- Throws:
InterruptedException
-
getStatements
An internal method to retrieve the inner array that stores the statements. Useful to reduce the number of volatile reads.- Returns:
- the underlying array og MemStatements
- Throws:
InterruptedException
-
getGuaranteedLastIndexInUse
public int getGuaranteedLastIndexInUse() -
setPrioritiseCleanup
public void setPrioritiseCleanup(boolean prioritiseCleanup)
-