public abstract class AbstractEquivalenceGraphStore extends Object implements EquivalenceGraphStore
| Constructor and Description |
|---|
AbstractEquivalenceGraphStore(MessageSender messageSender) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
doStore(com.google.common.collect.ImmutableSet<EquivalenceGraph> graphs) |
protected abstract GroupLock<Id> |
lock() |
protected abstract org.slf4j.Logger |
log() |
com.google.common.base.Optional<com.google.common.collect.ImmutableSet<EquivalenceGraph>> |
updateEquivalences(ResourceRef subject,
Set<ResourceRef> assertedAdjacents,
Set<org.atlasapi.media.entity.Publisher> sources)
Record a subject as equivalent to a set of other resources.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitresolveIdspublic AbstractEquivalenceGraphStore(MessageSender messageSender)
public final com.google.common.base.Optional<com.google.common.collect.ImmutableSet<EquivalenceGraph>> updateEquivalences(ResourceRef subject, Set<ResourceRef> assertedAdjacents, Set<org.atlasapi.media.entity.Publisher> sources) throws WriteException
EquivalenceGraphStoreRecord a subject as equivalent to a set of other resources.
An update overwrites all equivalences for resources which are sourced from elements of the supplied sources set.
The return value, if an update occurs, is the set of new
EquivalenceGraphs formed as a result of the update.
Updates are idempotent - if the subject is asserted equivalent to the
same resources and set of sources then no update occurs and
Optional.absent() is returned.
An update may not occur if the update would create a equivalence set that is too large.
updateEquivalences in interface EquivalenceGraphStoresubject - - reference to the resource which is to be recorded equivalent
to the asserted adjacent resources.assertedAdjacents - - references to resources which are equivalent to the subject.sources - - the Publishers
for which this update should be applied.EquivalenceGraphs formed by this update, or
Optional.absent() if no update occurs.WriteException - - if there is an exception recording the update of
equivalences.protected abstract void doStore(com.google.common.collect.ImmutableSet<EquivalenceGraph> graphs)
protected abstract org.slf4j.Logger log()
Copyright © 2014. All rights reserved.