This file contains hidden or 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
| class CoroutineDebouncer<K, V> constructor( | |
| private val pendingBoard: ConcurrentMap<K, Deferred<V?>> | |
| ) { | |
| /** | |
| * Debounce given a `task` based upon given `id`. This prevents jobs with same IDs run in parallel. | |
| * For subsequent callers get Deferred<V> of first (winning) coroutine. | |
| * Once Deferred<V> completes it is remove from the board. | |
| * | |
| * @param id for uniquely identifying a task | |
| * @param context under which given coroutine will be executed |
This file contains hidden or 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
| @Startup | |
| @ApplicationScoped | |
| public class SingletonFeatureManagerProvider { | |
| @ConfigProperty(name = "my.toggles.config.file") | |
| String featuresPropertyFileLocation; | |
| FeatureManager featureManager; | |
| @PostConstruct | |
| public void init() { |
This file contains hidden or 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
| package ari.dnrs.registry.configuration; | |
| import static org.hamcrest.Matchers.is; | |
| import static org.junit.Assert.assertThat; | |
| import java.util.Set; | |
| import org.junit.Before; | |
| import org.junit.Test; | |
| import org.springframework.context.ApplicationContext; |
This file contains hidden or 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
| /* | |
| * Template backbone.js code that encapsulates a | |
| * datatable.net table within a view for a hypothetical ;) | |
| * auction listings application. | |
| */ | |
| var HomeRouter = Backbone.Router.extend({ | |
| routes: { | |
| 'refresh' : 'refresh', |