Class Task


  • public class Task
    extends Object
    Represents a basic unit of work. In essence it describes "what" is to be done. It knows nothing of the "how".
    Author:
    Daniel Bernstein
    • Constructor Detail

      • Task

        public Task()
    • Method Detail

      • setType

        public void setType​(Task.Type type)
      • addProperty

        public void addProperty​(String key,
                                String value)
      • removeProperty

        public String removeProperty​(String key)
      • getVisibilityTimeout

        public Integer getVisibilityTimeout()
      • setVisibilityTimeout

        public void setVisibilityTimeout​(Integer visibilityTimeout)
      • getAttempts

        public int getAttempts()
        The number of completed attempts to process this task.
        Returns:
      • incrementAttempts

        public void incrementAttempts()
        Increments the attempts property. This method should only be called by TaskQueue implementations.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object