X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.db.procore%2Fsrc%2Ffi%2Fvtt%2Fsimantics%2Fprocore%2Finternal%2FTransactionSupportImpl.java;h=d89ad51aa06812a534cbe05696da0512a673d121;hp=52819b61759a170b162a1065bfae3fe767fa0f0c;hb=0da8a106b00aead3a4bcdbaf1e911b4eb1845a24;hpb=969bd23cab98a79ca9101af33334000879fb60c5 diff --git a/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/TransactionSupportImpl.java b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/TransactionSupportImpl.java index 52819b617..d89ad51aa 100644 --- a/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/TransactionSupportImpl.java +++ b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/TransactionSupportImpl.java @@ -1,38 +1,38 @@ -package fi.vtt.simantics.procore.internal; - -import org.simantics.db.service.TransactionSupport; - -public class TransactionSupportImpl implements TransactionSupport { - - final private SessionImplSocket session; - - TransactionSupportImpl(SessionImplSocket session) { - this.session = session; - } - - private int getAsyncCount() { - return session.state.getAsyncCount(); - } - - @Override - public int getReadCount() { - return session.state.getReadCount(); - } - - @Override - public int getWriteCount() { - return session.state.getWriteCount(); - } - - @Override - public void waitCompletion() { - while(getReadCount() > 0 || getWriteCount() > 0 || getAsyncCount() > 0) { - try { - Thread.sleep(10); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - -} +package fi.vtt.simantics.procore.internal; + +import org.simantics.db.service.TransactionSupport; + +public class TransactionSupportImpl implements TransactionSupport { + + final private SessionImplSocket session; + + TransactionSupportImpl(SessionImplSocket session) { + this.session = session; + } + + private int getAsyncCount() { + return session.state.getAsyncCount(); + } + + @Override + public int getReadCount() { + return session.state.getReadCount(); + } + + @Override + public int getWriteCount() { + return session.state.getWriteCount(); + } + + @Override + public void waitCompletion() { + while(getReadCount() > 0 || getWriteCount() > 0 || getAsyncCount() > 0) { + try { + Thread.sleep(10); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + } + +}