< prev index next >

src/java.base/share/classes/sun/net/www/http/KeepAliveCache.java

Print this page

        

@@ -47,10 +47,11 @@
  * @author Dave Brown
  */
 public class KeepAliveCache
     extends HashMap<KeepAliveKey, ClientVector>
     implements Runnable {
+    @java.io.Serial
     private static final long serialVersionUID = -2937172892064557949L;
 
     /* maximum # keep-alive connections to maintain at once
      * This should be 2 by the HTTP spec, but because we don't support pipe-lining
      * a larger value is more appropriate. So we now set a default of 5, and the value

@@ -201,14 +202,16 @@
     }
 
     /*
      * Do not serialize this class!
      */
+    @java.io.Serial
     private void writeObject(ObjectOutputStream stream) throws IOException {
         throw new NotSerializableException();
     }
 
+    @java.io.Serial
     private void readObject(ObjectInputStream stream)
         throws IOException, ClassNotFoundException
     {
         throw new NotSerializableException();
     }

@@ -216,10 +219,11 @@
 
 /* FILO order for recycling HttpClients, should run in a thread
  * to time them out.  If > maxConns are in use, block.
  */
 class ClientVector extends ArrayDeque<KeepAliveEntry> {
+    @java.io.Serial
     private static final long serialVersionUID = -8680532108106489459L;
 
     // sleep time in milliseconds, before cache clear
     int nap;
 

@@ -266,14 +270,16 @@
     }
 
     /*
      * Do not serialize this class!
      */
+    @java.io.Serial
     private void writeObject(ObjectOutputStream stream) throws IOException {
         throw new NotSerializableException();
     }
 
+    @java.io.Serial
     private void readObject(ObjectInputStream stream)
         throws IOException, ClassNotFoundException
     {
         throw new NotSerializableException();
     }
< prev index next >