public class ForwardingPrioritableRunnable<T> extends PrioritizableRunnable<T>
dirty, relativeWaitingTime
Constructor and Description |
---|
ForwardingPrioritableRunnable(PrioritizableRunnable<T> delegate) |
Modifier and Type | Method and Description |
---|---|
PrioritizableRunnable<T> |
getDelegate() |
double |
getPriority()
Returns the priority.
|
PriorityCalculator<T> |
getPriorityCalculator() |
double |
getRelativeWaitingTime()
Gets the relative waiting time
|
long |
getTimestamp()
Returns the timestamp.
|
boolean |
isDirty() |
void |
markDirty(boolean dirty)
marks this runnable as dirty so the priority should be recalculated
if necessary.
|
T |
prioritySource() |
void |
run() |
void |
setRelativeWaitingTime(com.google.common.base.Function<Long,Double> normalizer)
Uses the normaliser to set the relative waiting time of this
runnable and marks it as dirty
|
public ForwardingPrioritableRunnable(PrioritizableRunnable<T> delegate)
public T prioritySource()
prioritySource
in interface Prioritizable<T>
prioritySource
in class PrioritizableRunnable<T>
public void run()
run
in interface Runnable
run
in class PrioritizableRunnable<T>
public PriorityCalculator<T> getPriorityCalculator()
getPriorityCalculator
in class PrioritizableRunnable<T>
public long getTimestamp()
Prioritizable
getTimestamp
in interface Prioritizable<T>
getTimestamp
in class PrioritizableRunnable<T>
public double getRelativeWaitingTime()
PrioritizableRunnable
getRelativeWaitingTime
in interface Prioritizable<T>
getRelativeWaitingTime
in class PrioritizableRunnable<T>
public void markDirty(boolean dirty)
PrioritizableRunnable
markDirty
in class PrioritizableRunnable<T>
public boolean isDirty()
isDirty
in class PrioritizableRunnable<T>
public double getPriority()
Prioritizable
getPriority
in interface Prioritizable<T>
getPriority
in class PrioritizableRunnable<T>
public void setRelativeWaitingTime(com.google.common.base.Function<Long,Double> normalizer)
PrioritizableRunnable
setRelativeWaitingTime
in class PrioritizableRunnable<T>
public PrioritizableRunnable<T> getDelegate()
Copyright © 2010–2024 The DAISY Consortium. All rights reserved.