Class TransferJobPriorityManager

  • All Implemented Interfaces:
    PriorityMgrIfc

    public class TransferJobPriorityManager
    extends java.lang.Object
    implements PriorityMgrIfc
    Manager class that is used to manage the priority of current TransferJobs
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static interface  TransferJobPriorityManager.Bumper
      Functional Interface that provides classes with the ability to return a file bumper
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(TransferJob job)
      Adds the TransferJob into the system
      boolean bumpPriority​(java.lang.String path)
      Bumps the priority of a given file
      void clear()
      Clears all existing data from the priority manager
      void remove​(TransferJob job)
      Removes the transfer job from the implementation
      java.util.List<unlimited.core.util.common.tuples.Pair<java.lang.String,​TransferJobPriority>> search​(java.lang.String filter, int limit)
      Searches through the PriorityManager list and returns the files and priorities that match the request
      void swap​(TransferJob from, TransferJob to)
      Swaps the details of two TransferJobs
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • clear

        public void clear()
        Description copied from interface: PriorityMgrIfc
        Clears all existing data from the priority manager
        Specified by:
        clear in interface PriorityMgrIfc
      • bumpPriority

        public boolean bumpPriority​(java.lang.String path)
        Description copied from interface: PriorityMgrIfc
        Bumps the priority of a given file
        Specified by:
        bumpPriority in interface PriorityMgrIfc
        Returns:
      • search

        public java.util.List<unlimited.core.util.common.tuples.Pair<java.lang.String,​TransferJobPriority>> search​(java.lang.String filter,
                                                                                                                         int limit)
        Description copied from interface: PriorityMgrIfc
        Searches through the PriorityManager list and returns the files and priorities that match the request
        Specified by:
        search in interface PriorityMgrIfc
        Parameters:
        filter - Filter to search by
        limit - Limit for the files to return
        Returns: