Class RefreshArchiveTreeHandler

java.lang.Object
io.goobi.viewer.model.job.mq.RefreshArchiveTreeHandler
All Implemented Interfaces:
MessageHandler<MessageStatus>

public class RefreshArchiveTreeHandler extends Object implements MessageHandler<MessageStatus>
Message handler that unloads cached archive trees for a set of record identifiers so that they are reloaded from Solr on next access.
  • Field Details

  • Constructor Details

    • RefreshArchiveTreeHandler

      public RefreshArchiveTreeHandler()
  • Method Details

    • call

      public MessageStatus call(ViewerMessage ticket, MessageQueueManager queueManager)
      Description copied from interface: MessageHandler
      Call this method to execute the ticket.
      Specified by:
      call in interface MessageHandler<MessageStatus>
      Parameters:
      ticket - The ticket to handle
      queueManager - reference to to manage the queue
      Returns:
      V
    • addPendingIdentifiers

      public static boolean addPendingIdentifiers(Collection<String> identifiers)
      Registers identifiers of (re)indexed records whose associated archive trees need to be unloaded.
      Parameters:
      identifiers - Record identifiers
      Returns:
      true if the caller must queue a new refresh task; false if a queued task will already handle the identifiers
    • isRefreshQueued

      public static boolean isRefreshQueued()
      Returns:
      true if a refresh task is queued but has not started yet
    • resetRefreshQueued

      public static void resetRefreshQueued()
      Resets the queued state, e.g. if queueing the refresh task failed.
    • hasArchiveAssociatedRecords

      public static boolean hasArchiveAssociatedRecords(String identifiers) throws PresentationException, IndexUnreachableException
      Throws:
      PresentationException
      IndexUnreachableException
    • getMessageHandlerName

      public String getMessageHandlerName()
      Specified by:
      getMessageHandlerName in interface MessageHandler<MessageStatus>