@Test(timeout=60000) public void testCreateShutdown() throws Exception { DomainSocketWatcher watcher = newDomainSocketWatcher(10000000); watcher.close(); }
@Override public void close() throws IOException { lock.lock(); try { if (closed) return; if (LOG.isDebugEnabled()) { LOG.debug(this + ": closing"); } closed = true; } finally { lock.unlock(); } notificationSockets[0].close(); Uninterruptibles.joinUninterruptibly(watcherThread); }
DomainSocketWatcher implements Closeable { @Override public void close() throws IOException { lock.lock(); try { if (closed) return; if (LOG.isDebugEnabled()) { LOG.debug(this + ": closing"); } closed = true; } finally { lock.unlock(); } notificationSockets[0].close(); Uninterruptibles.joinUninterruptibly(watcherThread); } }
DomainSocketWatcher implements Closeable { @Override public void close() throws IOException { lock.lock(); try { if (closed) return; if (LOG.isDebugEnabled()) { LOG.debug(this + ": closing"); } closed = true; } finally { lock.unlock(); } notificationSockets[0].close(); Uninterruptibles.joinUninterruptibly(watcherThread); } DomainSocketWatcher(int interruptCheckPeriodMs); }
DomainSocketWatcher implements Closeable { @Override public void close() throws IOException { lock.lock(); try { if (closed) return; if (LOG.isDebugEnabled()) { LOG.debug(this + ": closing"); } closed = true; } finally { lock.unlock(); } notificationSockets[0].close(); Uninterruptibles.joinUninterruptibly(watcherThread); } DomainSocketWatcher(int interruptCheckPeriodMs); static String getLoadingFailureReason(); @Override void close(); @VisibleForTesting boolean isClosed(); void add(DomainSocket sock, Handler handler); void remove(DomainSocket sock); String toString(); }
DomainSocketWatcher implements Closeable { @Override public void close() throws IOException { lock.lock(); try { if (closed) return; if (LOG.isDebugEnabled()) { LOG.debug(this + ": closing"); } closed = true; } finally { lock.unlock(); } notificationSockets[0].close(); Uninterruptibles.joinUninterruptibly(watcherThread); } DomainSocketWatcher(int interruptCheckPeriodMs); static String getLoadingFailureReason(); @Override void close(); @VisibleForTesting boolean isClosed(); void add(DomainSocket sock, Handler handler); void remove(DomainSocket sock); String toString();  }