X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.db.common%2Fsrc%2Forg%2Fsimantics%2Fdb%2Fcommon%2Fprocessor%2FProcessorBase.java;h=1f00ff008674e73ada990c71e297e9f01afe2f19;hb=refs%2Fchanges%2F69%2F1969%2F7;hp=d8d3cdbf1049f3853f14bf5b6236684afc872126;hpb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db.common/src/org/simantics/db/common/processor/ProcessorBase.java b/bundles/org.simantics.db.common/src/org/simantics/db/common/processor/ProcessorBase.java index d8d3cdbf1..1f00ff008 100644 --- a/bundles/org.simantics.db.common/src/org/simantics/db/common/processor/ProcessorBase.java +++ b/bundles/org.simantics.db.common/src/org/simantics/db/common/processor/ProcessorBase.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2010 Association for Decentralized Information Management + * Copyright (c) 2007, 2018 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 @@ -12,8 +12,9 @@ package org.simantics.db.common.processor; import java.util.Collection; +import java.util.function.Consumer; -import org.simantics.db.RequestProcessor; +import org.simantics.db.AsyncRequestProcessor; import org.simantics.db.Resource; import org.simantics.db.Session; import org.simantics.db.exception.DatabaseException; @@ -42,9 +43,8 @@ import org.simantics.db.request.WriteInterface; import org.simantics.db.request.WriteOnly; import org.simantics.db.request.WriteOnlyResult; import org.simantics.db.request.WriteResult; -import org.simantics.utils.datastructures.Callback; -public class ProcessorBase implements RequestProcessor { +public class ProcessorBase implements AsyncRequestProcessor { @Override public void asyncRequest(AsyncMultiRead request, AsyncMultiProcedure procedure) { @@ -57,17 +57,17 @@ public class ProcessorBase implements RequestProcessor { } @Override - public void asyncRequest(Write request, Callback callback) { + public void asyncRequest(Write request, Consumer callback) { throw new UnsupportedOperationException(); } @Override - public void asyncRequest(DelayedWrite request, Callback callback) { + public void asyncRequest(DelayedWrite request, Consumer callback) { throw new UnsupportedOperationException(); } @Override - public void asyncRequest(WriteOnly request, Callback callback) { + public void asyncRequest(WriteOnly request, Consumer callback) { throw new UnsupportedOperationException(); } @@ -173,11 +173,6 @@ public class ProcessorBase implements RequestProcessor { throw new UnsupportedOperationException(); } - @Override - public Collection syncRequest(MultiRead request, AsyncMultiProcedure procedure) { - throw new UnsupportedOperationException(); - } - @Override public Collection syncRequest(MultiRead request, MultiProcedure procedure) { throw new UnsupportedOperationException(); @@ -193,11 +188,6 @@ public class ProcessorBase implements RequestProcessor { throw new UnsupportedOperationException(); } - @Override - public void asyncRequest(MultiRead request, AsyncMultiProcedure procedure) { - throw new UnsupportedOperationException(); - } - @Override public void asyncRequest(MultiRead request, MultiProcedure procedure) { throw new UnsupportedOperationException(); @@ -313,11 +303,6 @@ public class ProcessorBase implements RequestProcessor { throw new UnsupportedOperationException(); } - @Override - public Collection syncRequest(MultiRead arg0, AsyncMultiListener arg1) { - throw new UnsupportedOperationException(); - } - @Override public Collection syncRequest(MultiRead arg0, SyncMultiListener arg1) { throw new UnsupportedOperationException(); @@ -355,11 +340,6 @@ public class ProcessorBase implements RequestProcessor { throw new UnsupportedOperationException(); } - @Override - public void asyncRequest(MultiRead arg0, AsyncMultiListener arg1) { - throw new UnsupportedOperationException(); - } - @Override public void asyncRequest(MultiRead arg0, SyncMultiListener arg1) { throw new UnsupportedOperationException();