public abstract class Update extends ComparableObject.Impl implements java.lang.Runnable
MergingUpdateQueue. Equal tasks (instances with the equal identity objects) are merged, i.e.
only the first of them is executed. If some tasks are more generic than others override canEat(Update) method.MergingUpdateQueueComparableObject.Impl| Modifier and Type | Field and Description |
|---|---|
static int |
HIGH_PRIORITY |
static int |
LOW_PRIORITY |
NONE| Constructor and Description |
|---|
Update(java.lang.Object identity) |
Update(java.lang.Object identity,
boolean executeInWriteAction) |
Update(java.lang.Object identity,
boolean executeInWriteAction,
int priority) |
Update(java.lang.Object identity,
int priority) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canEat(Update update)
Override this method and return
true if this task is more generic than the passed update, e.g. |
static Update |
create(java.lang.Object identity,
java.lang.Runnable runnable) |
boolean |
executeInWriteAction() |
int |
getPriority() |
boolean |
isDisposed() |
boolean |
isExpired() |
boolean |
isRejected() |
void |
setProcessed() |
void |
setRejected() |
java.lang.String |
toString() |
boolean |
wasProcessed() |
equals, getEqualityObjects, hashCodepublic static final int LOW_PRIORITY
public static final int HIGH_PRIORITY
public Update(java.lang.Object identity)
public Update(java.lang.Object identity,
int priority)
public Update(java.lang.Object identity,
boolean executeInWriteAction)
public Update(java.lang.Object identity,
boolean executeInWriteAction,
int priority)
public boolean isDisposed()
public boolean isExpired()
public boolean wasProcessed()
public void setProcessed()
public boolean executeInWriteAction()
public java.lang.String toString()
toString in class java.lang.Objectpublic final int getPriority()
public boolean canEat(Update update)
true if this task is more generic than the passed update, e.g. this tasks repaint the
whole frame and the passed task repaint some component on the frame. In that case the less generic tasks will be removed from the queue
before execution.public void setRejected()
public boolean isRejected()
public static Update create(java.lang.Object identity, java.lang.Runnable runnable)