Class Task

java.lang.Object
org.duracloud.common.queue.task.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
  • Field Details

  • Constructor Details

    • Task

      public Task()
  • Method Details

    • getType

      public Task.Type getType()
    • setType

      public void setType(Task.Type type)
    • getProperties

      public Map<String,String> getProperties()
    • getProperty

      public String getProperty(String key)
    • 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.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object