summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
f801ac1)
Needed to suppor preference-configurability of diagram editor background
disposal.
refs #7863
Change-Id: Ibf9f29dde2c06f5b055bfd42f989368c7573f327
(cherry picked from commit
56a44956cc6cf02ee85b7cfd55c8d3cbfb80a82f)
public static final long DISPOSE_TIME = 30000L; // ms
public static final long MIN_DELAY = 200L; // ms
public static final long DISPOSE_TIME = 30000L; // ms
public static final long MIN_DELAY = 200L; // ms
- private final int maxQueueLength;
- private ArrayDeque<Runnable> disposerQueue = new ArrayDeque<Runnable>(MAX_QUEUE_LENGTH);
- private TObjectLongHashMap<Runnable> disposeTime =
- new TObjectLongHashMap<Runnable>(MAX_QUEUE_LENGTH);
+ private volatile int maxQueueLength;
+ private ArrayDeque<Runnable> disposerQueue;
+ private TObjectLongHashMap<Runnable> disposeTime;
private Runnable currentlyScheduled = null;
private Runnable disposeOne = () -> {
private Runnable currentlyScheduled = null;
private Runnable disposeOne = () -> {
};
public DisposingPolicy() {
};
public DisposingPolicy() {
- this(MAX_QUEUE_LENGTH);
+ this(MAX_QUEUE_LENGTH);
}
public DisposingPolicy(int maxQueueLength) {
this.maxQueueLength = maxQueueLength;
}
public DisposingPolicy(int maxQueueLength) {
this.maxQueueLength = maxQueueLength;
+ this.disposerQueue = new ArrayDeque<>(maxQueueLength);
+ this.disposeTime = new TObjectLongHashMap<>(maxQueueLength);
+ }
+
+ public void setMaxQueueLength(int maxQueueLength) {
+ this.maxQueueLength = maxQueueLength;
}
private void scheduleDispose() {
}
private void scheduleDispose() {