Skip to content
Permalink
Browse files

8234871: deprecate SocketFlow (SO_FLOW_SLA) and related APIs for removal

Reviewed-by: alanb, chegar
  • Loading branch information
Michael-Mc-Mahon committed Dec 10, 2019
1 parent f330874 commit 0aaaed9d5b90427cbd00780b735f547b02ddce87
@@ -64,7 +64,11 @@ private 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 @@ private ExtendedSocketOptions() { }
new sun.net.ext.ExtendedSocketOptions(extendedOptions) {

@Override
@SuppressWarnings("removal")
public void setOption(FileDescriptor fd,
SocketOption<?> option,
Object value)
@@ -222,6 +227,7 @@ public void setOption(FileDescriptor fd,
}

@Override
@SuppressWarnings("removal")
public Object getOption(FileDescriptor fd,
SocketOption<?> option)
throws SocketException
@@ -265,6 +271,7 @@ public Object getOption(FileDescriptor fd,
private static final JavaIOFileDescriptorAccess fdAccess =
SharedSecrets.getJavaIOFileDescriptorAccess();

@SuppressWarnings("removal")
private static void setFlowOption(FileDescriptor fd, SocketFlow f)
throws SocketException
{
@@ -274,6 +281,7 @@ private static void setFlowOption(FileDescriptor fd, SocketFlow f)
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 @@ int setFlowOption(int fd, int priority, long bandwidth)
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 @@
* <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 @@
* 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 @@
* 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 @@ static boolean isReusePortAvailable() {
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.PrivilegedAction;
import jdk.net.ExtendedSocketOptions.PlatformSocketOptions;

@SuppressWarnings("removal")
class SolarisSocketOptions extends PlatformSocketOptions {

public SolarisSocketOptions() { }

0 comments on commit 0aaaed9

Please sign in to comment.
You can’t perform that action at this time.