@Override public void onRemoval(RemovalNotification<String, ServiceDiscoveredCacheEntry> notification) { ServiceDiscoveredCacheEntry entry = notification.getValue(); if (entry != null) { entry.cancel(); } } })
return new ServiceDiscoveredCacheEntry(serviceDiscovered, cancellable);
return new ServiceDiscoveredCacheEntry(serviceDiscovered, cancellable);
@Override public void onRemoval(RemovalNotification<String, ServiceDiscoveredCacheEntry> notification) { ServiceDiscoveredCacheEntry entry = notification.getValue(); if (entry != null) { entry.cancel(); } } })