Deprecated ChannelConfig.writeTimeoutMillis in favor of WriteTimeoutHandler
This commit is contained in:
parent
dde0232e19
commit
874fc7db77
@ -28,6 +28,7 @@ import java.util.Map;
|
|||||||
import org.jboss.netty.buffer.ChannelBufferFactory;
|
import org.jboss.netty.buffer.ChannelBufferFactory;
|
||||||
import org.jboss.netty.channel.socket.SocketChannelConfig;
|
import org.jboss.netty.channel.socket.SocketChannelConfig;
|
||||||
import org.jboss.netty.channel.socket.nio.NioSocketChannelConfig;
|
import org.jboss.netty.channel.socket.nio.NioSocketChannelConfig;
|
||||||
|
import org.jboss.netty.handler.timeout.WriteTimeoutHandler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A set of configuration properties of a {@link Channel}.
|
* A set of configuration properties of a {@link Channel}.
|
||||||
@ -55,8 +56,6 @@ import org.jboss.netty.channel.socket.nio.NioSocketChannelConfig;
|
|||||||
* </tr><tr>
|
* </tr><tr>
|
||||||
* <td>{@code "connectTimeoutMillis"}</td><td>{@link #setConnectTimeoutMillis(int)}</td>
|
* <td>{@code "connectTimeoutMillis"}</td><td>{@link #setConnectTimeoutMillis(int)}</td>
|
||||||
* </tr><tr>
|
* </tr><tr>
|
||||||
* <td>{@code "writeTimeoutMillis"}</td><td>{@link #setWriteTimeoutMillis(int)}</td>
|
|
||||||
* </tr><tr>
|
|
||||||
* <td>{@code "pipelineFactory"}</td><td>{@link #setPipelineFactory(ChannelPipelineFactory)}</td>
|
* <td>{@code "pipelineFactory"}</td><td>{@link #setPipelineFactory(ChannelPipelineFactory)}</td>
|
||||||
* </tr>
|
* </tr>
|
||||||
* </table>
|
* </table>
|
||||||
@ -119,6 +118,8 @@ public interface ChannelConfig {
|
|||||||
void setConnectTimeoutMillis(int connectTimeoutMillis);
|
void setConnectTimeoutMillis(int connectTimeoutMillis);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @deprecated Use {@link WriteTimeoutHandler} instead if necessary.
|
||||||
|
*
|
||||||
* Returns the write timeout of the channel in milliseconds. If a write
|
* Returns the write timeout of the channel in milliseconds. If a write
|
||||||
* operation is not completed within the write timeout, an
|
* operation is not completed within the write timeout, an
|
||||||
* {@link IOException} will be raised. If the {@link Channel} does not
|
* {@link IOException} will be raised. If the {@link Channel} does not
|
||||||
@ -127,9 +128,12 @@ public interface ChannelConfig {
|
|||||||
*
|
*
|
||||||
* @return the write timeout in milliseconds. {@code 0} if disabled.
|
* @return the write timeout in milliseconds. {@code 0} if disabled.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
int getWriteTimeoutMillis();
|
int getWriteTimeoutMillis();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @deprecated Use {@link WriteTimeoutHandler} instead if necessary.
|
||||||
|
*
|
||||||
* Sets the write timeout of the channel in milliseconds. If a write
|
* Sets the write timeout of the channel in milliseconds. If a write
|
||||||
* operation is not completed within the write timeout, an
|
* operation is not completed within the write timeout, an
|
||||||
* {@link IOException} will be raised. If the {@link Channel} does not
|
* {@link IOException} will be raised. If the {@link Channel} does not
|
||||||
@ -139,5 +143,6 @@ public interface ChannelConfig {
|
|||||||
* @param writeTimeoutMillis the write timeout in milliseconds.
|
* @param writeTimeoutMillis the write timeout in milliseconds.
|
||||||
* {@code 0} to disable.
|
* {@code 0} to disable.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
void setWriteTimeoutMillis(int writeTimeoutMillis);
|
void setWriteTimeoutMillis(int writeTimeoutMillis);
|
||||||
}
|
}
|
||||||
|
@ -163,10 +163,12 @@ public class DefaultServerSocketChannelConfig implements ServerSocketChannelConf
|
|||||||
// Unused
|
// Unused
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public int getWriteTimeoutMillis() {
|
public int getWriteTimeoutMillis() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public void setWriteTimeoutMillis(int writeTimeoutMillis) {
|
public void setWriteTimeoutMillis(int writeTimeoutMillis) {
|
||||||
// Unused
|
// Unused
|
||||||
}
|
}
|
||||||
|
@ -83,8 +83,6 @@ public class DefaultSocketChannelConfig implements SocketChannelConfig {
|
|||||||
setSoLinger(ConversionUtil.toInt(value));
|
setSoLinger(ConversionUtil.toInt(value));
|
||||||
} else if (key.equals("trafficClass")) {
|
} else if (key.equals("trafficClass")) {
|
||||||
setTrafficClass(ConversionUtil.toInt(value));
|
setTrafficClass(ConversionUtil.toInt(value));
|
||||||
} else if (key.equals("writeTimeoutMillis")) {
|
|
||||||
setWriteTimeoutMillis(ConversionUtil.toInt(value));
|
|
||||||
} else if (key.equals("connectTimeoutMillis")) {
|
} else if (key.equals("connectTimeoutMillis")) {
|
||||||
setConnectTimeoutMillis(ConversionUtil.toInt(value));
|
setConnectTimeoutMillis(ConversionUtil.toInt(value));
|
||||||
} else if (key.equals("pipelineFactory")) {
|
} else if (key.equals("pipelineFactory")) {
|
||||||
@ -237,6 +235,7 @@ public class DefaultSocketChannelConfig implements SocketChannelConfig {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public int getWriteTimeoutMillis() {
|
public int getWriteTimeoutMillis() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -252,6 +251,7 @@ public class DefaultSocketChannelConfig implements SocketChannelConfig {
|
|||||||
// Unused
|
// Unused
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public void setWriteTimeoutMillis(int writeTimeoutMillis) {
|
public void setWriteTimeoutMillis(int writeTimeoutMillis) {
|
||||||
// Unused
|
// Unused
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,7 @@ class EmbeddedChannelConfig implements ChannelConfig {
|
|||||||
return bufferFactory;
|
return bufferFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public int getWriteTimeoutMillis() {
|
public int getWriteTimeoutMillis() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -80,6 +81,7 @@ class EmbeddedChannelConfig implements ChannelConfig {
|
|||||||
// Unused
|
// Unused
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public void setWriteTimeoutMillis(int writeTimeoutMillis) {
|
public void setWriteTimeoutMillis(int writeTimeoutMillis) {
|
||||||
// Unused
|
// Unused
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user