Package org.alfresco.repo.action
Class AbstractAsynchronousActionFilter
- java.lang.Object
-
- org.alfresco.repo.action.AbstractAsynchronousActionFilter
-
- All Implemented Interfaces:
java.util.Comparator<OngoingAsyncAction>
- Direct Known Subclasses:
CreateThumbnailActionFilter
public abstract class AbstractAsynchronousActionFilter extends java.lang.Object implements java.util.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 Constructor Description AbstractAsynchronousActionFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetActionDefinitionName()Gets the action definition name against which this comparator is registered.java.lang.StringgetName()Gets the name of this comparator.voidinit()voidsetActionDefinitionName(java.lang.String actionDefinitionName)voidsetAsynchronousActionExecutionQueue(AsynchronousActionExecutionQueueImpl asynchronousActionExecutionQueue)voidsetName(java.lang.String name)Sets the name of this comparator.
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Gets the name of this comparator.- Returns:
- String
-
setName
public void setName(java.lang.String name)
Sets the name of this comparator.- Parameters:
name- String
-
getActionDefinitionName
public java.lang.String getActionDefinitionName()
Gets the action definition name against which this comparator is registered.- Returns:
- String
-
setActionDefinitionName
public void setActionDefinitionName(java.lang.String actionDefinitionName)
-
setAsynchronousActionExecutionQueue
public void setAsynchronousActionExecutionQueue(AsynchronousActionExecutionQueueImpl asynchronousActionExecutionQueue)
-
init
public void init()
-
-