Package io.goobi.viewer.model.job.mq
Class RefreshArchiveTreeHandler
java.lang.Object
io.goobi.viewer.model.job.mq.RefreshArchiveTreeHandler
- All Implemented Interfaces:
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanaddPendingIdentifiers(Collection<String> identifiers) Registers identifiers of (re)indexed records whose associated archive trees need to be unloaded.call(ViewerMessage ticket, MessageQueueManager queueManager) Call this method to execute the ticket.static booleanhasArchiveAssociatedRecords(String identifiers) static booleanstatic voidResets the queued state, e.g. if queueing the refresh task failed.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.goobi.viewer.controller.mq.MessageHandler
call, onStartup
-
Field Details
-
PARAMETER_IDENTIFIERS
- See Also:
-
-
Constructor Details
-
RefreshArchiveTreeHandler
public RefreshArchiveTreeHandler()
-
-
Method Details
-
call
Description copied from interface:MessageHandlerCall this method to execute the ticket.- Specified by:
callin interfaceMessageHandler<MessageStatus>- Parameters:
ticket- The ticket to handlequeueManager- reference to to manage the queue- Returns:
- V
-
addPendingIdentifiers
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 -
getMessageHandlerName
- Specified by:
getMessageHandlerNamein interfaceMessageHandler<MessageStatus>
-