X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.diagram%2Fsrc%2Forg%2Fsimantics%2Fdiagram%2Fsynchronization%2FCollectingModificationQueue.java;h=0bb36e9bfccbd4723a613463380adb8f3c56ecf8;hb=006602e856bbc3e222789cfe00a923b863e3e91b;hp=91ef3c562fcfc588d1356fbb1878b7795f6eba03;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.diagram/src/org/simantics/diagram/synchronization/CollectingModificationQueue.java b/bundles/org.simantics.diagram/src/org/simantics/diagram/synchronization/CollectingModificationQueue.java index 91ef3c562..0bb36e9bf 100644 --- a/bundles/org.simantics.diagram/src/org/simantics/diagram/synchronization/CollectingModificationQueue.java +++ b/bundles/org.simantics.diagram/src/org/simantics/diagram/synchronization/CollectingModificationQueue.java @@ -1,50 +1,50 @@ -/******************************************************************************* - * Copyright (c) 2007, 2010 Association for Decentralized Information Management - * in Industry THTH ry. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.diagram.synchronization; - -import java.util.ArrayDeque; -import java.util.Deque; - -import org.simantics.utils.threads.IThreadWorkQueue; - -/** - * @author Tuukka Lehtonen - */ -public class CollectingModificationQueue implements IModificationQueue { - - private final Deque queue = new ArrayDeque(); - - @Override - public boolean offer(IModification m) { - return offer(m, null); - } - - @Override - public boolean offer(IModification m, IThreadWorkQueue completionThread) { - return queue.add(m); - } - - public Deque getQueue() { - return queue; - } - - @Override - public void finish() throws InterruptedException { - // Do nothing - } - - @Override - public void flush() { - // Do nothing - } - +/******************************************************************************* + * Copyright (c) 2007, 2010 Association for Decentralized Information Management + * in Industry THTH ry. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.diagram.synchronization; + +import java.util.ArrayDeque; +import java.util.Deque; + +import org.simantics.utils.threads.IThreadWorkQueue; + +/** + * @author Tuukka Lehtonen + */ +public class CollectingModificationQueue implements IModificationQueue { + + private final Deque queue = new ArrayDeque(); + + @Override + public boolean offer(IModification m) { + return offer(m, null); + } + + @Override + public boolean offer(IModification m, IThreadWorkQueue completionThread) { + return queue.add(m); + } + + public Deque getQueue() { + return queue; + } + + @Override + public void finish() throws InterruptedException { + // Do nothing + } + + @Override + public void flush() { + // Do nothing + } + } \ No newline at end of file