public interface EquivalenceGraphStore
Records equivalences between resources.
| Modifier and Type | Method and Description |
|---|---|
com.google.common.util.concurrent.ListenableFuture<com.metabroadcast.common.collect.OptionalMap<Id,EquivalenceGraph>> |
resolveIds(Iterable<Id> ids) |
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.
|
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
Record 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.
subject - - 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.com.google.common.util.concurrent.ListenableFuture<com.metabroadcast.common.collect.OptionalMap<Id,EquivalenceGraph>> resolveIds(Iterable<Id> ids)
Copyright © 2014. All rights reserved.