@ Nullable public ServerSocketsList getServerSockets ( long serverId , long fromId , int maxPageSize ) { ServerSocketMap serverSockets = perServerSockets . get ( serverId ) ; if ( serverSockets == null ) { return null ; } List < InternalWithLogId > socketList = new ArrayList <> ( maxPageSize ) ; Iterator < InternalInstrumented < SocketStats > > iterator = serverSockets . tailMap ( fromId ) . values ( ) . iterator ( ) ; while ( socketList . size ( ) < maxPageSize && iterator . hasNext ( ) ) { socketList . add ( iterator . next ( ) ) ; } return new ServerSocketsList ( socketList , ! iterator . hasNext ( ) ) ; }
Returns socket refs for a server .