test_class.file: bundles/org.openhab.core/src/test/java/org/openhab/core/internal/service/ReadyServiceImplTest.java
test_class.identifier: ReadyServiceImplTest
test_case.body: @Test
      public void testUnregisterTracker() {
          ReadyTracker tracker = mock(ReadyTracker.class);
          ReadyServiceImpl rs = new ReadyServiceImpl();
          rs.markReady(new ReadyMarker("foo", "id"));
          rs.registerTracker(tracker, new ReadyMarkerFilter());
          verify(tracker).onReadyMarkerAdded(isA(ReadyMarker.class));
          rs.unregisterTracker(tracker);
          verify(tracker).onReadyMarkerRemoved(isA(ReadyMarker.class));
          verifyNoMoreInteractions(tracker);
      }
test_case.class_method_signature: ReadyServiceImplTest.testUnregisterTracker()
test_case.full_signature: @Test public void testUnregisterTracker()
test_case.identifier: testUnregisterTracker
test_case.invocations: mock markReady registerTracker onReadyMarkerAdded verify isA unregisterTracker onReadyMarkerRemoved verify isA verifyNoMoreInteractions
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testUnregisterTracker()
focal_class.declarator: logger = LoggerFactory.getLogger(ReadyServiceImpl.class)
focal_class.modifier: private final
focal_class.original_string: private final Logger logger = LoggerFactory.getLogger(ReadyServiceImpl.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: ANY = new ReadyMarkerFilter()
focal_class.modifier: private static final
focal_class.original_string: private static final ReadyMarkerFilter ANY = new ReadyMarkerFilter();
focal_class.type: ReadyMarkerFilter
focal_class.var_name: ANY
focal_class.declarator: markers = Collections.newSetFromMap(new ConcurrentHashMap<>())
focal_class.modifier: private final
focal_class.original_string: private final Set<ReadyMarker> markers = Collections.newSetFromMap(new ConcurrentHashMap<>());
focal_class.type: Set<ReadyMarker>
focal_class.var_name: markers
focal_class.declarator: trackers = new HashMap<>()
focal_class.modifier: private final
focal_class.original_string: private final Map<ReadyTracker, ReadyMarkerFilter> trackers = new HashMap<>();
focal_class.type: Map<ReadyTracker, ReadyMarkerFilter>
focal_class.var_name: trackers
focal_class.declarator: rwlTrackers = new ReentrantReadWriteLock(true)
focal_class.modifier: private final
focal_class.original_string: private final ReentrantReadWriteLock rwlTrackers = new ReentrantReadWriteLock(true);
focal_class.type: ReentrantReadWriteLock
focal_class.var_name: rwlTrackers
focal_class.file: bundles/org.openhab.core/src/main/java/org/openhab/core/internal/service/ReadyServiceImpl.java
focal_class.identifier: ReadyServiceImpl
focal_class.interfaces: implements ReadyService
focal_class.class_method_signature: ReadyServiceImpl.markReady(ReadyMarker readyMarker)
focal_class.full_signature: @Override public void markReady(ReadyMarker readyMarker)
focal_class.identifier: markReady
focal_class.modifiers: @Override public
focal_class.parameters: (ReadyMarker readyMarker)
focal_class.return: void
focal_class.signature: void markReady(ReadyMarker readyMarker)
focal_class.class_method_signature: ReadyServiceImpl.unmarkReady(ReadyMarker readyMarker)
focal_class.full_signature: @Override public void unmarkReady(ReadyMarker readyMarker)
focal_class.identifier: unmarkReady
focal_class.modifiers: @Override public
focal_class.parameters: (ReadyMarker readyMarker)
focal_class.return: void
focal_class.signature: void unmarkReady(ReadyMarker readyMarker)
focal_class.class_method_signature: ReadyServiceImpl.notifyTrackers(ReadyMarker readyMarker, Consumer<ReadyTracker> action)
focal_class.full_signature: private void notifyTrackers(ReadyMarker readyMarker, Consumer<ReadyTracker> action)
focal_class.identifier: notifyTrackers
focal_class.modifiers: private
focal_class.parameters: (ReadyMarker readyMarker, Consumer<ReadyTracker> action)
focal_class.return: void
focal_class.signature: void notifyTrackers(ReadyMarker readyMarker, Consumer<ReadyTracker> action)
focal_class.class_method_signature: ReadyServiceImpl.isReady(ReadyMarker readyMarker)
focal_class.full_signature: @Override public boolean isReady(ReadyMarker readyMarker)
focal_class.identifier: isReady
focal_class.modifiers: @Override public
focal_class.parameters: (ReadyMarker readyMarker)
focal_class.return: boolean
focal_class.signature: boolean isReady(ReadyMarker readyMarker)
focal_class.class_method_signature: ReadyServiceImpl.registerTracker(ReadyTracker readyTracker)
focal_class.full_signature: @Override public void registerTracker(ReadyTracker readyTracker)
focal_class.identifier: registerTracker
focal_class.modifiers: @Override public
focal_class.parameters: (ReadyTracker readyTracker)
focal_class.return: void
focal_class.signature: void registerTracker(ReadyTracker readyTracker)
focal_class.class_method_signature: ReadyServiceImpl.registerTracker(ReadyTracker readyTracker, ReadyMarkerFilter filter)
focal_class.full_signature: @Override public void registerTracker(ReadyTracker readyTracker, ReadyMarkerFilter filter)
focal_class.identifier: registerTracker
focal_class.modifiers: @Override public
focal_class.parameters: (ReadyTracker readyTracker, ReadyMarkerFilter filter)
focal_class.return: void
focal_class.signature: void registerTracker(ReadyTracker readyTracker, ReadyMarkerFilter filter)
focal_class.class_method_signature: ReadyServiceImpl.unregisterTracker(ReadyTracker readyTracker)
focal_class.full_signature: @Override public void unregisterTracker(ReadyTracker readyTracker)
focal_class.identifier: unregisterTracker
focal_class.modifiers: @Override public
focal_class.parameters: (ReadyTracker readyTracker)
focal_class.return: void
focal_class.signature: void unregisterTracker(ReadyTracker readyTracker)
focal_class.class_method_signature: ReadyServiceImpl.notifyTracker(ReadyTracker readyTracker, Consumer<ReadyMarker> action)
focal_class.full_signature: private void notifyTracker(ReadyTracker readyTracker, Consumer<ReadyMarker> action)
focal_class.identifier: notifyTracker
focal_class.modifiers: private
focal_class.parameters: (ReadyTracker readyTracker, Consumer<ReadyMarker> action)
focal_class.return: void
focal_class.signature: void notifyTracker(ReadyTracker readyTracker, Consumer<ReadyMarker> action)
focal_method.body: @Override
      public void unregisterTracker(ReadyTracker readyTracker) {
          rwlTrackers.writeLock().lock();
          try {
              if (trackers.containsKey(readyTracker)) {
                  notifyTracker(readyTracker, marker -> readyTracker.onReadyMarkerRemoved(marker));
              }
              trackers.remove(readyTracker);
          } finally {
              rwlTrackers.writeLock().unlock();
          }
      }
focal_method.class_method_signature: ReadyServiceImpl.unregisterTracker(ReadyTracker readyTracker)
focal_method.full_signature: @Override public void unregisterTracker(ReadyTracker readyTracker)
focal_method.identifier: unregisterTracker
focal_method.invocations: lock writeLock containsKey notifyTracker onReadyMarkerRemoved remove unlock writeLock
focal_method.modifiers: @Override public
focal_method.parameters: (ReadyTracker readyTracker)
focal_method.return: void
focal_method.signature: void unregisterTracker(ReadyTracker readyTracker)