8234871: deprecate SocketFlow (SO_FLOW_SLA) and related APIs for removal
Reviewed-by: alanb, chegar
This commit is contained in:
parent
f33087405a
commit
0aaaed9d5b
src/jdk.net
share/classes/jdk/net
solaris/classes/jdk/net
@ -64,7 +64,11 @@ public final class ExtendedSocketOptions {
|
||||
* setting or getting this option requires a {@link NetworkPermission}
|
||||
* {@code ("setOption.SO_FLOW_SLA")} or {@code "getOption.SO_FLOW_SLA"}
|
||||
* respectively.
|
||||
* @deprecated This is supported only on Solaris. Due to deprecation
|
||||
* of Solaris port, this option is also deprecated.
|
||||
*/
|
||||
@Deprecated(since="14", forRemoval=true)
|
||||
@SuppressWarnings("removal")
|
||||
public static final SocketOption<SocketFlow> SO_FLOW_SLA = new
|
||||
ExtSocketOption<SocketFlow>("SO_FLOW_SLA", SocketFlow.class);
|
||||
|
||||
@ -192,6 +196,7 @@ public final class ExtendedSocketOptions {
|
||||
new sun.net.ext.ExtendedSocketOptions(extendedOptions) {
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("removal")
|
||||
public void setOption(FileDescriptor fd,
|
||||
SocketOption<?> option,
|
||||
Object value)
|
||||
@ -222,6 +227,7 @@ public final class ExtendedSocketOptions {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("removal")
|
||||
public Object getOption(FileDescriptor fd,
|
||||
SocketOption<?> option)
|
||||
throws SocketException
|
||||
@ -265,6 +271,7 @@ public final class ExtendedSocketOptions {
|
||||
private static final JavaIOFileDescriptorAccess fdAccess =
|
||||
SharedSecrets.getJavaIOFileDescriptorAccess();
|
||||
|
||||
@SuppressWarnings("removal")
|
||||
private static void setFlowOption(FileDescriptor fd, SocketFlow f)
|
||||
throws SocketException
|
||||
{
|
||||
@ -274,6 +281,7 @@ public final class ExtendedSocketOptions {
|
||||
f.status(status); // augment the given flow with the status
|
||||
}
|
||||
|
||||
@SuppressWarnings("removal")
|
||||
private static void getFlowOption(FileDescriptor fd, SocketFlow f)
|
||||
throws SocketException {
|
||||
int status = platformSocketOptions.getFlowOption(fdAccess.get(fd), f);
|
||||
@ -362,6 +370,7 @@ public final class ExtendedSocketOptions {
|
||||
throw new UnsupportedOperationException("unsupported socket option");
|
||||
}
|
||||
|
||||
@SuppressWarnings("removal")
|
||||
int getFlowOption(int fd, SocketFlow f) throws SocketException {
|
||||
throw new UnsupportedOperationException("unsupported socket option");
|
||||
}
|
||||
|
@ -49,14 +49,15 @@ import java.security.BasicPermission;
|
||||
* <td>set the {@link ExtendedSocketOptions#SO_FLOW_SLA SO_FLOW_SLA} option
|
||||
* on any socket that supports it</td>
|
||||
* <td>allows caller to set a higher priority or bandwidth allocation
|
||||
* to sockets it creates, than they might otherwise be allowed.</td>
|
||||
* to sockets it creates, than they might otherwise be allowed.
|
||||
* This permission is deprecated.</td>
|
||||
* </tr>
|
||||
* <tr>
|
||||
* <th scope="row">getOption.SO_FLOW_SLA</th>
|
||||
* <td>retrieve the {@link ExtendedSocketOptions#SO_FLOW_SLA SO_FLOW_SLA}
|
||||
* setting from any socket that supports the option</td>
|
||||
* <td>allows caller access to SLA information that it might not
|
||||
* otherwise have</td>
|
||||
* otherwise have. This permission is deprecated.</td>
|
||||
* </tr>
|
||||
* </tbody>
|
||||
* </table>
|
||||
|
@ -43,8 +43,12 @@ import java.lang.annotation.Native;
|
||||
* When a security manager is installed, a {@link NetworkPermission}
|
||||
* is required to set or get this option.
|
||||
*
|
||||
* @deprecated This is supported only on Solaris. Due to deprecation
|
||||
* of Solaris port, this feature is also deprecated.
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@Deprecated(since="14", forRemoval=true)
|
||||
public class SocketFlow {
|
||||
|
||||
@Native public static final int UNSET = -1;
|
||||
@ -65,9 +69,13 @@ public class SocketFlow {
|
||||
* socket option. Both setting and getting the option return
|
||||
* one of these statuses, which reflect the state of socket's
|
||||
* flow.
|
||||
* @deprecated This is supported only on Solaris. Due to
|
||||
* deprecation of Solaris port, this enum is also deprecated.
|
||||
*
|
||||
* @since 1.8
|
||||
*/
|
||||
@SuppressWarnings("removal")
|
||||
@Deprecated(since="14", forRemoval=true)
|
||||
public enum Status {
|
||||
/**
|
||||
* Set or get socket option has not been called yet. Status
|
||||
|
@ -259,6 +259,7 @@ public class Sockets {
|
||||
return isReusePortAvailable;
|
||||
}
|
||||
|
||||
@SuppressWarnings("removal")
|
||||
private static Map<Class<?>,Set<SocketOption<?>>> optionSets() {
|
||||
Map<Class<?>,Set<SocketOption<?>>> options = new HashMap<>();
|
||||
boolean flowsupported = PlatformSocketOptions.get().flowSupported();
|
||||
|
@ -30,6 +30,7 @@ import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
import jdk.net.ExtendedSocketOptions.PlatformSocketOptions;
|
||||
|
||||
@SuppressWarnings("removal")
|
||||
class SolarisSocketOptions extends PlatformSocketOptions {
|
||||
|
||||
public SolarisSocketOptions() { }
|
||||
|
Loading…
x
Reference in New Issue
Block a user