Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public InformerEventSource(
configuration);
// If there is a primary to secondary mapper there is no need for primary to secondary index.
primaryToSecondaryMapper = configuration.getPrimaryToSecondaryMapper();
if (useSecondaryToPrimaryIndex()) {
if (usePrimaryToSecondaryIndex()) {
primaryToSecondaryIndex =
// The index uses the secondary to primary mapper (always present) to build the index
new DefaultPrimaryToSecondaryIndex<>(configuration.getSecondaryToPrimaryMapper());
Expand Down Expand Up @@ -236,7 +236,7 @@ protected void propagateEvent(R resource, R oldResource, Set<ResourceID> primary
@Override
public Set<R> getSecondaryResources(P primary) {
Set<ResourceID> secondaryIDs;
if (useSecondaryToPrimaryIndex()) {
if (usePrimaryToSecondaryIndex()) {
var primaryResourceID = ResourceID.fromResource(primary);
secondaryIDs = primaryToSecondaryIndex.getSecondaryResources(primaryResourceID);
log.debug(
Expand Down Expand Up @@ -281,7 +281,7 @@ private Set<ResourceID> handleRecentCreateOrUpdate(R newResource, R previousVers
return relatedPrimaryIds;
}

private boolean useSecondaryToPrimaryIndex() {
private boolean usePrimaryToSecondaryIndex() {
return this.primaryToSecondaryMapper == null;
}

Expand Down
Loading