Created
March 14, 2018 18:12
-
-
Save efenderbosch/93abe885afa0e7fdbd486a87b8cc4263 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PublishingInMemoryFeatureStore extends InMemoryFeatureStore { | |
@Override | |
public <T extends VersionedData> void upsert(VersionedDataKind<T> kind, T item) { | |
String key = item.getKey(); | |
T current = get(kind, key); | |
super.upsert(kind, item); | |
T updated = get(kind, key); | |
if (!Objects.equals(current, updated)) { | |
// do publish | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment