Package org.eclipse.rdf4j.spring.uuidsource
package org.eclipse.rdf4j.spring.uuidsource
This package contains different approaches for generating UUIDs. One of them always generates the same sequence of
UUIDs after bean initialization, which is useful for tests. Three of them obtain them from a
Repository
, guaranteeing their uniqueness. Due to the very, very,
very low probability of a collision, it is recommended not to use any of the latter and instead rely on the one
instantiated by default, DefaultUUIDSource
.
PredictableUUIDSource
: Always generate the same sequence of UUIDs.NoveltyCheckingUUIDSource
: Generate aUUID
locally usingUUID.randomUUID()
and then ask the repository if the UUID is unique. Enable withrdf4j.spring.uuidsource.noveltychecking.enabled=true
SimpleRepositoryUUIDSource
: Ask the repository for a new UUID each time one is needed. Enable withrdf4j.spring.uuidsource.simple.enabled=true
UUIDSequence
: When a UUID is needed, ask the repository for N >> 1 UUIDs and answer one at a time. Enable withrdf4j.spring.uuidsource.sequence.enabled=true
- Since:
- 4.0.0
- Author:
- Florian Kleedorfer