Package org.alfresco.repo.action
Class AbstractAsynchronousActionFilter
java.lang.Object
org.alfresco.repo.action.AbstractAsynchronousActionFilter
- All Implemented Interfaces:
Comparator<OngoingAsyncAction>
- Direct Known Subclasses:
CreateThumbnailActionFilter
public abstract class AbstractAsynchronousActionFilter
extends Object
implements Comparator<OngoingAsyncAction>
This class is the base filter class for asynchronous actions. These filters are used in identifying
'equivalent' actions in the asynchronous action execution service. By registering
a subclass of this type, all actions of a given action-definition-name that are still pending
(i.e. currently executing or in the queue awaiting execution) will be compared to any new action
and if they are equal (as determined by the compare implementation defined herein) the newly
submitted action will not be added to the queue and will be dropped.
Concrete subclasses can be implemented and then dependency-injected using the spring-bean
baseActionFilter as their parent.
- Author:
- Neil McErlean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the action definition name against which this comparator is registered.getName()Gets the name of this comparator.voidinit()voidsetActionDefinitionName(String actionDefinitionName) voidsetAsynchronousActionExecutionQueue(AsynchronousActionExecutionQueueImpl asynchronousActionExecutionQueue) voidSets the name of this comparator.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
compare, equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
AbstractAsynchronousActionFilter
public AbstractAsynchronousActionFilter()
-
-
Method Details
-
getName
Gets the name of this comparator.- Returns:
- String
-
setName
Sets the name of this comparator.- Parameters:
name- String
-
getActionDefinitionName
Gets the action definition name against which this comparator is registered.- Returns:
- String
-
setActionDefinitionName
-
setAsynchronousActionExecutionQueue
public void setAsynchronousActionExecutionQueue(AsynchronousActionExecutionQueueImpl asynchronousActionExecutionQueue) -
init
public void init()
-