本文整理了Java中org.apache.flink.util.IOUtils.closeSocket()
方法的一些代码示例,展示了IOUtils.closeSocket()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。IOUtils.closeSocket()
方法的具体详情如下:
包路径:org.apache.flink.util.IOUtils
类名称:IOUtils
方法名:closeSocket
[英]Closes the socket ignoring IOException.
[中]关闭套接字,忽略IOException。
代码示例来源:origin: apache/flink
@Override
public void cancel() {
isRunning = false;
// we need to close the socket as well, because the Thread.interrupt() function will
// not wake the thread in the socketStream.read() method when blocked.
Socket theSocket = this.currentSocket;
if (theSocket != null) {
IOUtils.closeSocket(theSocket);
}
}
}
代码示例来源:origin: org.apache.flink/flink-streaming-java_2.10
@Override
public void cancel() {
isRunning = false;
// we need to close the socket as well, because the Thread.interrupt() function will
// not wake the thread in the socketStream.read() method when blocked.
Socket theSocket = this.currentSocket;
if (theSocket != null) {
IOUtils.closeSocket(theSocket);
}
}
}
代码示例来源:origin: org.apache.flink/flink-streaming-java
@Override
public void cancel() {
isRunning = false;
// we need to close the socket as well, because the Thread.interrupt() function will
// not wake the thread in the socketStream.read() method when blocked.
Socket theSocket = this.currentSocket;
if (theSocket != null) {
IOUtils.closeSocket(theSocket);
}
}
}
代码示例来源:origin: org.apache.flink/flink-streaming-java_2.11
@Override
public void cancel() {
isRunning = false;
// we need to close the socket as well, because the Thread.interrupt() function will
// not wake the thread in the socketStream.read() method when blocked.
Socket theSocket = this.currentSocket;
if (theSocket != null) {
IOUtils.closeSocket(theSocket);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!