public void triggerLoadingWithDelay ( ) { if ( delayedTrigger == null ) { Runnable runnable = ( ) -> { Operation op = new TriggerLoadIfNeededOperation ( mapName ) ; opService . invokeOnPartition ( SERVICE_NAME , op , mapNamePartition ) ; } ; delayedTrigger = new CoalescingDelayedTrigger ( execService , LOADING_TRIGGER_DELAY , LOADING_TRIGGER_DELAY , runnable ) ; } delayedTrigger . executeWithDelay ( ) ; }
Triggers key loading on SENDER if it hadn t started . Delays triggering if invoked multiple times .