Class MapDbCollectionFactory
- java.lang.Object
-
- org.eclipse.rdf4j.collection.factory.mapdb.MapDbCollectionFactory
-
- All Implemented Interfaces:
AutoCloseable,CollectionFactory
public class MapDbCollectionFactory extends Object implements CollectionFactory
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classMapDbCollectionFactory.CommitingMap<K,V>protected static classMapDbCollectionFactory.CommitingSet<T>protected classMapDbCollectionFactory.MemoryTillSizeXSet<V>Only create a disk based set once the contents are large enough that it starts to pay off.
-
Field Summary
Fields Modifier and Type Field Description protected longcolectionIdprotected org.mapdb.DBdbprotected longiterationCacheSyncThreshold
-
Constructor Summary
Constructors Constructor Description MapDbCollectionFactory(long iterationCacheSyncThreshold)MapDbCollectionFactory(long iterationCacheSyncThreshold, CollectionFactory delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()BindingSetKeycreateBindingSetKey(org.eclipse.rdf4j.query.BindingSet bindingSet, List<Function<org.eclipse.rdf4j.query.BindingSet,org.eclipse.rdf4j.model.Value>> getValues, ToIntFunction<org.eclipse.rdf4j.query.BindingSet> hashOfBindingSetCalculator)<E> Map<BindingSetKey,E>createGroupByMap()<T> List<T>createList()<K,V>
Map<K,V>createMap()<T> Queue<T>createQueue()<T> Set<T>createSet()Set<org.eclipse.rdf4j.query.BindingSet>createSetOfBindingSets()Set<org.eclipse.rdf4j.query.BindingSet>createSetOfBindingSets(Supplier<org.eclipse.rdf4j.query.MutableBindingSet> create, Function<String,Predicate<org.eclipse.rdf4j.query.BindingSet>> getHas, Function<String,Function<org.eclipse.rdf4j.query.BindingSet,org.eclipse.rdf4j.model.Value>> getget, Function<String,BiConsumer<org.eclipse.rdf4j.model.Value,org.eclipse.rdf4j.query.MutableBindingSet>> getSet)<V> Map<org.eclipse.rdf4j.model.Value,V>createValueKeyedMap()List<org.eclipse.rdf4j.model.Value>createValueList()Queue<org.eclipse.rdf4j.model.Value>createValueQueue()Set<org.eclipse.rdf4j.model.Value>createValueSet()protected voidinit()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.rdf4j.collection.factory.api.CollectionFactory
hashAValue, hashOfBindingSetFuntion
-
-
-
-
Constructor Detail
-
MapDbCollectionFactory
public MapDbCollectionFactory(long iterationCacheSyncThreshold)
-
MapDbCollectionFactory
public MapDbCollectionFactory(long iterationCacheSyncThreshold, CollectionFactory delegate)
-
-
Method Detail
-
init
protected void init()
-
createList
public <T> List<T> createList()
- Specified by:
createListin interfaceCollectionFactory
-
createValueList
public List<org.eclipse.rdf4j.model.Value> createValueList()
- Specified by:
createValueListin interfaceCollectionFactory
-
createSetOfBindingSets
public Set<org.eclipse.rdf4j.query.BindingSet> createSetOfBindingSets(Supplier<org.eclipse.rdf4j.query.MutableBindingSet> create, Function<String,Predicate<org.eclipse.rdf4j.query.BindingSet>> getHas, Function<String,Function<org.eclipse.rdf4j.query.BindingSet,org.eclipse.rdf4j.model.Value>> getget, Function<String,BiConsumer<org.eclipse.rdf4j.model.Value,org.eclipse.rdf4j.query.MutableBindingSet>> getSet)
- Specified by:
createSetOfBindingSetsin interfaceCollectionFactory
-
createSetOfBindingSets
public Set<org.eclipse.rdf4j.query.BindingSet> createSetOfBindingSets()
- Specified by:
createSetOfBindingSetsin interfaceCollectionFactory
-
createSet
public <T> Set<T> createSet()
- Specified by:
createSetin interfaceCollectionFactory
-
createValueSet
public Set<org.eclipse.rdf4j.model.Value> createValueSet()
- Specified by:
createValueSetin interfaceCollectionFactory
-
createMap
public <K,V> Map<K,V> createMap()
- Specified by:
createMapin interfaceCollectionFactory
-
createValueKeyedMap
public <V> Map<org.eclipse.rdf4j.model.Value,V> createValueKeyedMap()
- Specified by:
createValueKeyedMapin interfaceCollectionFactory
-
createQueue
public <T> Queue<T> createQueue()
- Specified by:
createQueuein interfaceCollectionFactory
-
createValueQueue
public Queue<org.eclipse.rdf4j.model.Value> createValueQueue()
- Specified by:
createValueQueuein interfaceCollectionFactory
-
close
public void close() throws org.eclipse.rdf4j.common.exception.RDF4JException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCollectionFactory- Throws:
org.eclipse.rdf4j.common.exception.RDF4JException
-
createGroupByMap
public <E> Map<BindingSetKey,E> createGroupByMap()
- Specified by:
createGroupByMapin interfaceCollectionFactory
-
createBindingSetKey
public BindingSetKey createBindingSetKey(org.eclipse.rdf4j.query.BindingSet bindingSet, List<Function<org.eclipse.rdf4j.query.BindingSet,org.eclipse.rdf4j.model.Value>> getValues, ToIntFunction<org.eclipse.rdf4j.query.BindingSet> hashOfBindingSetCalculator)
- Specified by:
createBindingSetKeyin interfaceCollectionFactory
-
-