Package org.duracloud.common.queue.task
Class Task
java.lang.Object
org.duracloud.common.queue.task.Task
Represents a basic unit of work. In essence it describes "what" is to be
done. It knows nothing of the "how".
- Author:
- Daniel Bernstein
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProperty(String key, String value) booleanintThe number of completed attempts to process this task.getProperty(String key) getType()inthashCode()voidIncrements the attempts property.removeProperty(String key) voidvoidsetVisibilityTimeout(Integer visibilityTimeout) toString()
-
Field Details
-
KEY_TYPE
- See Also:
-
-
Constructor Details
-
Task
public Task()
-
-
Method Details
-
getType
-
setType
-
getProperties
-
getProperty
-
addProperty
-
removeProperty
-
getVisibilityTimeout
-
setVisibilityTimeout
-
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
-
hashCode
public int hashCode() -
toString
-