@Test public void getMessageTracker() throws Exception { Tracker<Object, Object> messageTracker = this.clientTracker.getTracker(mockClientId(1L)); assertThat(messageTracker, notNullValue()); assertThat(clientTracker.getTracker(mockClientId(1L)), sameInstance(messageTracker)); assertThat(clientTracker.getTracker(mockClientId(2L)), not(sameInstance(messageTracker))); }
TrackerImpl<M, R> getTracker(ClientSourceId clientId) { return objectTrackers.computeIfAbsent(clientId, d -> new TrackerImpl<>()); }
ClientTrackerImpl implements ClientTracker<M, R> { TrackerImpl<M, R> getTracker(ClientSourceId clientId) { return objectTrackers.computeIfAbsent(clientId, d -> new TrackerImpl<>()); } }
ClientTrackerImpl implements ClientTracker<M, R> { TrackerImpl<M, R> getTracker(ClientSourceId clientId) { return objectTrackers.computeIfAbsent(clientId, d -> new TrackerImpl<>()); } ClientTrackerImpl(); }
ClientTrackerImpl implements ClientTracker<M, R> { TrackerImpl<M, R> getTracker(ClientSourceId clientId) { return objectTrackers.computeIfAbsent(clientId, d -> new TrackerImpl<>()); } ClientTrackerImpl(); @Override void untrackClient(ClientSourceId clientId); @Override Set<ClientSourceId> getTrackedClients(); @Override void addStateTo(StateDumpCollector stateDumper); }
ClientTrackerImpl implements ClientTracker<M, R> { TrackerImpl<M, R> getTracker(ClientSourceId clientId) { return objectTrackers.computeIfAbsent(clientId, d -> new TrackerImpl<>()); } ClientTrackerImpl(); @Override void untrackClient(ClientSourceId clientId); @Override Set<ClientSourceId> getTrackedClients(); @Override void addStateTo(StateDumpCollector stateDumper);  }