X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.db.layer0%2Fsrc%2Forg%2Fsimantics%2Fdb%2Flayer0%2Futil%2FDomainStatementProcedure2.java;h=b2e3af5707e94d14ee0b8af3413ea863c2965408;hb=3e8cd4aef089a228d7f2e141f2b2159f820a4266;hp=65e5a24733b3a2fa455897b27aadc17f34e4ecab;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/DomainStatementProcedure2.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/DomainStatementProcedure2.java index 65e5a2473..b2e3af570 100644 --- a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/DomainStatementProcedure2.java +++ b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/util/DomainStatementProcedure2.java @@ -1,39 +1,39 @@ -/******************************************************************************* - * 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.db.layer0.util; - -import java.util.Collection; - -import org.simantics.db.AsyncReadGraph; -import org.simantics.db.DirectStatements; -import org.simantics.db.procedure.AsyncProcedure; - -final public class DomainStatementProcedure2 implements AsyncProcedure { - - final private Collection[] results; - - public DomainStatementProcedure2(Collection[] results) { - this.results = results; - } - - @Override - public void execute(AsyncReadGraph graph, final DirectStatements ds) { - int thread = graph.thread(); - results[thread].add(ds); - } - - @Override - public void exception(AsyncReadGraph graph, Throwable throwable) { - throwable.printStackTrace(); - } - -} +/******************************************************************************* + * 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.db.layer0.util; + +import java.util.Collection; + +import org.simantics.db.AsyncReadGraph; +import org.simantics.db.DirectStatements; +import org.simantics.db.procedure.AsyncProcedure; + +final public class DomainStatementProcedure2 implements AsyncProcedure { + + final private Collection[] results; + + public DomainStatementProcedure2(Collection[] results) { + this.results = results; + } + + @Override + public void execute(AsyncReadGraph graph, final DirectStatements ds) { + int thread = graph.thread(); + results[thread].add(ds); + } + + @Override + public void exception(AsyncReadGraph graph, Throwable throwable) { + throwable.printStackTrace(); + } + +}