Package org.glassfish.hk2.runlevel
Interface Sorter
-
@Contract public interface Sorter
Contract for sorting descriptors for run level services. It should be noted that sorting the handles in a multi-threaded environment is a heuristic in any case, as the threads are scheduled randomly. Sorting can only be guaranteed in a single threaded or no-threaded case.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<ServiceHandle<?>>
sort(java.util.List<ServiceHandle<?>> descriptors)
Sort the given list of run level service handles.
-
-
-
Method Detail
-
sort
java.util.List<ServiceHandle<?>> sort(java.util.List<ServiceHandle<?>> descriptors)
Sort the given list of run level service handles. This method will only be called when the run-level is going up in value. When going down in value services are always stopped in the reverse order from which they were started- Parameters:
descriptors
- the list descriptors to be sorted- Returns:
- The list as sorted. If this returns null then the list as passed in will be used. If any of the service handles returned are not in the run-level being processed they will be ignored. This list may add or remove handles to the list
-
-