public void registerListener ( JobID jobId , KvStateRegistryListener listener ) { final KvStateRegistryListener previousValue = listeners . putIfAbsent ( jobId , listener ) ; if ( previousValue != null ) { throw new IllegalStateException ( "Listener already registered under " + jobId + ' ' ) ; } }
Registers a listener with the registry .