java.io.Closeable, java.lang.AutoCloseable@LimitedPrivate("HDFS")
public final class DomainSocketWatcher
extends java.lang.Object
implements java.io.Closeable
DomainSocket for more information about UNIX domain sockets.| Modifier and Type | Class | Description |
|---|---|---|
static interface |
DomainSocketWatcher.Handler |
| Constructor | Description |
|---|---|
DomainSocketWatcher(int interruptCheckPeriodMs,
java.lang.String src) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
add(DomainSocket sock,
DomainSocketWatcher.Handler handler) |
Add a socket.
|
void |
close() |
Close the DomainSocketWatcher and wait for its thread to terminate.
|
static java.lang.String |
getLoadingFailureReason() |
|
boolean |
isClosed() |
|
void |
remove(DomainSocket sock) |
Remove a socket.
|
java.lang.String |
toString() |
public DomainSocketWatcher(int interruptCheckPeriodMs,
java.lang.String src)
throws java.io.IOException
java.io.IOExceptionpublic static java.lang.String getLoadingFailureReason()
public void close()
throws java.io.IOException
close in interface java.lang.AutoCloseableclose in interface java.io.Closeablejava.io.IOException@VisibleForTesting public boolean isClosed()
public void add(DomainSocket sock, DomainSocketWatcher.Handler handler)
sock - The socket to add. It is an error to re-add a socket that
we are already watching.handler - The handler to associate with this socket. This may be
called any time after this function is called.public void remove(DomainSocket sock)
sock - The socket to remove.public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2008–2025 Apache Software Foundation. All rights reserved.