public class RdfRepository extends Object
| Constructor and Description |
|---|
RdfRepository(UrisScheme uris,
RdfClient rdfClient,
long maxPostSize) |
| Modifier and Type | Method and Description |
|---|---|
Instant |
fetchLeftOffTime()
Fetch where we left off updating the repository.
|
com.google.common.collect.ImmutableSetMultimap<String,String> |
getRefs(Collection<String> entityIds)
Get list of reference subjects connected to entity.
|
com.google.common.collect.ImmutableSetMultimap<String,String> |
getValues(Collection<String> entityIds)
Get list of value subjects connected to entity.
|
boolean |
hasRevision(String entityId,
long revision)
Does the triple store have this revision or better.
|
Set<String> |
hasRevisions(Collection<Change> candidates)
Filter set of changes and see which of them really need to be updated.
|
int |
sync(String entityId,
Collection<org.openrdf.model.Statement> statements)
Synchronizes the RDF repository's representation.
|
int |
sync(String entityId,
Collection<org.openrdf.model.Statement> statements,
Collection<String> valueList)
Synchronizes the RDF repository's representation of an entity to be
exactly the provided statements.
|
int |
syncFromChanges(Collection<Change> changes,
boolean verifyResult)
Sync repository from changes list.
|
void |
updateLeftOffTime(Instant leftOffTime)
Update where we left off so when fetchLeftOffTime is next called it
returns leftOffTime so we can continue from there after the updater is
restarted.
|
protected final RdfClient rdfClient
public RdfRepository(UrisScheme uris, RdfClient rdfClient, long maxPostSize)
maxPostSize - Max POST form content size.
Should be in sync with Jetty org.eclipse.jetty.server.Request.maxFormContentSize setting.
Production default is 200M, see runBlazegraph.sh file.
If that setting is changed, this one should change too, otherwise we get POST errors on big updates.
See: https://phabricator.wikimedia.org/T210235public com.google.common.collect.ImmutableSetMultimap<String,String> getValues(Collection<String> entityIds)
public com.google.common.collect.ImmutableSetMultimap<String,String> getRefs(Collection<String> entityIds)
public int syncFromChanges(Collection<Change> changes, boolean verifyResult)
changes - List of changes.public int sync(String entityId, Collection<org.openrdf.model.Statement> statements, Collection<String> valueList)
entityId - id of the entity to syncstatements - all known statements about the entityvalueList - list of used values, for cleanuppublic int sync(String entityId, Collection<org.openrdf.model.Statement> statements)
entityId - id of the entity to syncstatements - all known statements about the entitysync(String, Collection, Collection)public Set<String> hasRevisions(Collection<Change> candidates)
candidates - List of candidate changespublic boolean hasRevision(String entityId, long revision)
public Instant fetchLeftOffTime()
public void updateLeftOffTime(Instant leftOffTime)
Copyright © 2019. All rights reserved.